Css tips are constantly updated. css tips are constantly updated.
1. After removing input and remembering the password, the system automatically fills in the yellow background of the form.
Input:-webkit-autofill {-webkit-box-shadow: 0 0 0px 1000px # FFF inset ;}
// Where # fff is the background color value
2. IE8 does not support the opacity: 0 attribute. You can add the following attribute:
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
3. In the IE input box, remove the cross in the text box and the eye icon in the password input box:
::-ms-clear,::-ms-reveal{display:none;}
4. textarea attributes
Resize: none; // remove the size. Drag outline: none; // remove the yellow border.
5. Make sure that the regular expression is correct.
Regular. test (the val value to be satisfied)
6. Single line text omitted
overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
7. When the font-size in the style table is smaller than 12px, the font in the Chinese chrome browser is still 12px, which can be used at this time:
html{-webkit-text-size-adjust:none;}
8. Do not wrap the xmp labels automatically:
xmp { whitewhite-space: pre-wrap; /* css-3 */ whitewhite-space: -moz-pre-wrap; /* Mozilla, since 1999 */ whitewhite-space: -pre-wrap; /* Opera 4-6 */ whitewhite-space: -o-pre-wrap; /* Opera 7 */ word-wrap: break-word; /* Internet Explorer 5.5+ */ white-space: pre-wrap; /* Firefox */}
9. Solution for invalid object height 0
Add a div to its outer layer so that the height of the div is 0 or the font-size is 0 <div>10. input boxTo eliminate the memory of input, add: autocomplete = "off" in the input box to prevent copying: oncopy = "return false;" oncut = "return false; "unpaste content in input: onpaste =" return false "unselect content in input to prevent copying: <body onselectstart =" return false ">
11. Full Screen mask code segment (fixed is a relative window)
<div class="mask"></div> .mask{position: fixed;top: 0;left: 0;width: 100%;height: 100%;z-index: 999;}
12. Differences between display: none and visibility: hidden:
Display: none; not displayed, not occupying space
Visibility: hidden; not displayed, occupying space