免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
css 填坑常用代碼分享
以下是常用的代碼收集,沒(méi)有任何技術(shù)含量,只是填坑的積累。

一. css 2.x code

1. 文字換行

/*強(qiáng)制不換行*/white-space:nowrap;/*自動(dòng)換行*/word-wrap: break-word;word-break: normal;/*強(qiáng)制英文單詞斷行*/word-break:break-all;

2. 兩端對(duì)齊

text-align:justify;text-justify:inter-ideogra

3. 去掉Webkit(chrome)瀏覽器中input(文本框)或textarea的黃色焦點(diǎn)框

http://www.cnblogs.com/niao/archive/2012/09/07/2674511.html

input,button,select,textarea{ outline:none;}textarea{ font-size:13px; resize:none;}

http://www.tuicool.com/articles/EZ777n

去掉chrome記住密碼后自動(dòng)填充表單的黃色背景

4. ie6: position:fixed

.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;}

5. clearfix

.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;}

http://www.daqianduan.com/3606.html

6. seperate-table

.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>

7. 光標(biāo)大?。?/h3>

http://hi.baidu.com/jiuyuefenglin/item/dee35b080366f11cebfe3862

8. min-height: 最小高度兼容代碼

.minheight500{min-height:500px;height:auto !important;height:500px;overflow:visible;}

9. 鼠標(biāo)不允許點(diǎn)擊:

cursor:not-allowed;

10. mac font: osx平臺(tái)字體優(yōu)化

font-family:"Hiragino Sans GB","Hiragino Sans GB W3",'微軟雅黑';

11. 省略號(hào):

.ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

二. css3 code

1. 漸變:

.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,#67bcf8,#3b96d6);background:linear-gradient(top,#67bcf8,#3b96d6);}

2.投影:

.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,0,0,.6);background:rgba(0,0,0,0.5);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#50000000',endColorstr='#50000000')\9;

看哪個(gè)startColorstr和endColorstr,一共8位,后6位是RGB的顏色代碼,前兩位是16進(jìn)制的

比如60%透明,就是256x0.6=154,再換算成16進(jìn)制=9A
background-image:-ms-linear-gradient(top, #fff, #ddd); ie10漸變
http://www.iefans.net/ie10-yulanban-css3-jianbian/

alpha透明兼容代碼生成:

http://leegorous.net/tools/bg-alpha.html

16進(jìn)制的轉(zhuǎn)換

http://www.zhangxinxu.com/wordpress/2010/05/rgba%E9%A2%9C%E8%89%B2%E4%B8%8E%E5%85%BC%E5%AE%B9%E6%80%A7%E7%9A%84%E5%8D%8A%E9%80%8F%E6%98%8E%E8%83%8C%E6%99%AF%E8%89%B2/

透明兼容

3. search占位

http://www.qianduan.net/search-box-style-custom-webkit.html

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

4.

title 換行:&#13;

5. 漸變

background: #bde25e; /* Old browsers */background: -moz-linear-gradient(top, #bde25e 2%, #8bb31d 100%); /* FF3.6+ */background: -webkit-gradient(linear, left top, left bottom, color-stop(2%,#bde25e), color-stop(100%,#8bb31d)); /* Chrome,Safari4+ */background: -webkit-linear-gradient(top, #bde25e 2%,#8bb31d 100%); /* Chrome10+,Safari5.1+ */background: -o-linear-gradient(top, #bde25e 2%,#8bb31d 100%); /* Opera 11.10+ */background: -ms-linear-gradient(top, #bde25e 2%,#8bb31d 100%); /* IE10+ */background: linear-gradient(to bottom, #bde25e 2%,#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;}}

http://www.colorzilla.com/gradient-editor/

有全部瀏覽器的兼容代碼生成

http://segmentfault.com/a/1190000000362621

CSS 實(shí)現(xiàn) textArea 的 placeholder 換行

6.阻止默認(rèn)事件

pointer-events:none;

7. 變灰 gray:

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);}

8. firefox 阻止選中:

-moz-user-focus:ignore;-moz-user-input:disabled;-moz-user-select:none;

9. 箭頭

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;

ie6 bug測(cè)試,把border-style設(shè)為dashed.

10. 取消textarea右下角可拖動(dòng)手柄:

resize:none

11. 取消chrome form表單的聚焦邊框:

input,button,select,textarea{outline:none}textarea{resize:none}

12. 取消a鏈接的黃色邊框:

a{-webkit-tap-highlight-color:rgba(0,0,0,0);}

13. 漸變

filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#ef6464, endColorstr= #eb4141);/*IE<9>*/-ms-filter: "progid:DXImageTransform.Microsoft.gradient (GradientType=0, startColorstr=#ef6464, endColorstr=#eb4141)";/*IE8+*/

14.chrome字體縮小:

.chrome_adjust { font-size: 9px; -webkit-transform: scale(0.75); }

15. webkit 水平居中:

display:-webkit-box;-webkit-box-pack:center; -webkit-box-align: center;

16. 取消chrome 搜索x提示:

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;}

17. autofill:

http://stackoverflow.com/questions/2338102/override-browser-form-filling-and-input-highlighting-with-html-css

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"

18. 手機(jī)版本網(wǎng)頁(yè)a標(biāo)記虛線框問(wèn)題

a:focus { outline:none; -moz-outline:none; }

19. 焦點(diǎn)去除背景:

-webkit-tap-highlight-color: rgba(255, 255, 255, 0);-webkit-tap-highlight-color: transparent;  // i.e. Nexus5/Chrome and Kindle Fire HD 7''

20. placeholder占位符顏色自定義

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

原文來(lái)自:http://www.cnblogs.com/jikey/p/4233003.html

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶(hù)發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
Web開(kāi)發(fā)者不容錯(cuò)過(guò)的20段CSS代碼
web前端技術(shù)?css
js仿百度貼吧驗(yàn)證碼特效
無(wú)需圖片,使用 CSS3 實(shí)現(xiàn)圓角按鈕
使用HTML 5和CSS3制作登錄頁(yè)面完整步驟
55個(gè)提高你CSS開(kāi)發(fā)效率的必備片段
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服