1, let the website quickly become gray
1 HTML{2 Filter:grayscale (100%);//ie Browser3 -webkit-filter:grayscale (100%);//Google Chrome4 -moz-filter:grayscale (100%);//Firefox5 -ms-filter:grayscale (100%);6 -o-filter:grayscale (100%);7 Filter:progid:DXImageTransform.Microsoft.BasicImage (grayscale=1);8 -webkit-filter:Grayscale (1);//Google Chrome9}
2. Allow Div to be edited like input
1 <DivID= "Test"contenteditable= "true" ></Div> 2 3 <DivID= "Test1"contenteditable= "true" ></Div> 4 5 <DivID= "Test2"contenteditable= "true"></Div>
Compatibility such as:
3. Let Div prohibit the selection
1 < unselectable= "on" onselectstart= "return false;" > 2 Try and see if you can choose 3 </ Div >
4. Setting Properties for Placeholder
1 ::-webkit-input-placeholder{/*WebKit Browsers*/2 Color:#999;3}4 :-moz-placeholder{/*Mozilla Firefox 4 to*/5 Color:#999;6}7 ::-moz-placeholder{/*Mozilla Firefox 19+*/8 Color:#999;9}Ten :-ms-input-placeholder{/*Internet Explorer + +*/ One Color:#999; A}
5. Clear Floating
1 . Clearfix:after {Display:block; Visibility:hidden; Clear:both; height:0; content:'. '; font-size:0}
6, text overflow display ellipsis
1 {display:bolck; Overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
7. Forced line break
1 //Automatic line wrapping2 3 Div{4 Word-wrap:Break-word;5 Word-break:Normal;6}7 8 //Force English words to break9 Ten Div{ One Word-break:Break-all; A} - - //Force No Line break the - Div{ - White-space:nowrap; -}
Ps: Not to Be continued ~
Common CSS Summary