分享css 填坑常用代码

前端之家收集整理的这篇文章主要介绍了分享css 填坑常用代码前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

下面是编程之家 jb51.cc 通过网络收集整理的代码片段。

编程之家小编现在分享给大家,也给大家做个参考。

一. css 2.x code

 
/*强制不换行*/
white-space:nowrap;
/*自动换行*/
word-wrap: break-word;
word-break: normal;
/*强制英文单词断行*/
word-break:break-all;

text-align:justify;text-justify:inter-ideogra
input,button,select,textarea{ outline:none;}
textarea{ font-size:13px; resize:none;}

http://www.tuicool.com/articles/EZ777n
 
.fixed-top /* position fixed Top */{position:fixed;bottom:auto;top:0; }
* html .fixed-top /* IE6 position fixed Top */{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop));}
*html{background-image:url(about:blank);background-attachment:fixed;}
.clearfix:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0;}
.clearfix{display:inline-block;}
html[xmlns] .clearfix{display:block;}
* html .clearfix{height:1%;}

.clearfix{*zoom: 1;}
.clearfix:after{clear:both;display:table;content:"”;}

.clearfix{overflow:hidden;_zoom:1;}


.tab{border-collapse:separate;border:1px solid #e0e0e0;}
.tab th,.tab td{padding:3px;font-size:12px;background:#f5f9fb;border:1px solid;border-color:#fff #deedf6 #deedf6 #fff;}
.tab th{background:#edf4f0;}
.tab tr.even td{background:#fff;}
<table class="tab" width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
        <th>111</th>
        <td>222</td>
    </tr>
    <tr>
        <th>111</th>
        <td>222</td>
    </tr>
</table>
.minheight500{min-height:500px;height:auto !important;height:500px;overflow:visible;}
cursor:not-allowed;
font-family:"Hiragino Sans GB","Hiragino Sans GB W3",'微软雅黑';
.ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

二. css 3 code

.a{background:-webkit-gradient(linear,left top,left bottom,from(#69bdf9),to(#4aa7e8));background:-moz-linear-gradient(top,#67bcf8,#3b96d6);background:-o-linear-gradient(top,#3b96d6);background:linear-gradient(top,#3b96d6);}
.b{Box-shadow:inset 1px -1px 0 #f1f1f1;text-shadow:1px 1px 0px #630;}
filter:progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr='#99000000',endColorstr='#99000000');background:rgba(0,.6);

background:rgba(0,0.5);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#50000000',endColorstr='#50000000')\9;

::-webkit-input-placeholder {}
::-moz-input-placeholder {}
input:focus::-webkit-input-placeholder { color: transparent; }
-webkit-appearance:none;  google边框去除
input[type="search"]{-webkit-appearance:textfield;} // 去除chrome默认样式
http://i.wanz.im/2011/02/04/remove_border_from_input_type_search/
http://blog.csdn.net/do_it__/article/details/6789699
line-height: normal; /* for non-ie */
line-height: 22px\9; /* for ie */   


title 换行:&#13;
 
background: #bde25e; /* Old browsers */
background: -moz-linear-gradient(top,#bde25e 2%,#8bb31d 100%); /* FF3.6+ */
background: -webkit-gradient(linear,color-stop(2%,#bde25e),color-stop(100%,#8bb31d)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,#8bb31d 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,#8bb31d 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,#8bb31d 100%); /* IE10+ */
background: linear-gradient(to bottom,#8bb31d 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#bde25e',endColorstr='#8bb31d',GradientType=0 ); /* IE6-9 */

 @media screen and (max-width:1220px) and (min-width:1151px) {
    #wrapper {font-size:15px;}
}

pointer-events:none; 
 
html{
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale");
filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
-webkit-filter: grayscale(1);
} 

-moz-user-focus:ignore;-moz-user-input:disabled;-moz-user-select:none;
display:block;border:solid transparent;line-height: 0;width:0; height:0;border-top:solid #0288ce;border-width:8px 6px 0 6px;

border-style:solid; border-width:7px; border-color:transparent transparent transparent #ff7020;
position:absolute;top: 0;left: 0;border-width:20px;border-style:solid;border-color:#d1ddde transparent transparent #d1ddde;
resize:none
input,textarea{outline:none} textarea{resize:none}
a{-webkit-tap-highlight-color:rgba(0,0);}
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#ef6464,endColorstr= #eb4141);/*IE<9>*/
-ms-filter: "progid:DXImageTransform.Microsoft.gradient (GradientType=0,endColorstr=#eb4141)";/*IE8+*/

.chrome_adjust { font-size: 9px; -webkit-transform: scale(0.75); }
15. webkit 水平居中:
 display:-webkit-Box;-webkit-Box-pack:center; -webkit-Box-align: center;
 
 input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration {
display: none;
} 

 
input:-webkit-autofill {-webkit-Box-shadow: 0 0 0px 1000px white inset;}

input:-webkit-autofill,textarea:-webkit-autofill,select:-webkit-autofill {

    -webkit-Box-shadow: 0 0 0 1000px white inset;

}
autocomplete="off"

a:focus { outline:none; -moz-outline:none; }
-webkit-tap-highlight-color: rgba(255,255,0);

-webkit-tap-highlight-color: transparent;  // i.e. Nexus5/Chrome and Kindle Fire HD 7''
input:-moz-placeholder { color: #369; }

::-webkit-input-placeholder { color:#369; }
 

来自: http://www.cnblogs.com/jikey/p/4233003.html

以上是编程之家(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所遇到的程序开发问题。

如果觉得编程之家网站内容还不错,欢迎将编程之家网站推荐给程序员好友。

原文链接:https://www.f2er.com/css/456827.html

猜你在找的CSS相关文章