日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關咨詢
選擇下列產品馬上在線溝通
服務時間:8:30-17:00
你可能遇到了下面的問題
關閉右側工具欄

新聞中心

這里有您想知道的互聯網營銷解決方案
分享10個很實用的CSS的代碼片段

 介紹

發(fā)展壯大離不開廣大客戶長期以來的信賴與支持,我們將始終秉承“誠信為本、服務至上”的服務理念,堅持“二合一”的優(yōu)良服務模式,真誠服務每家企業(yè),認真做好每個細節(jié),不斷完善自我,成就企業(yè),實現共贏。行業(yè)涉及木屋等,在成都網站建設、網絡營銷推廣、WAP手機網站、VI設計、軟件開發(fā)等項目上具有豐富的設計經驗。

以下是10個來自于網絡收集的非常實用且重要的CSS代碼片段

CSS重置

這是CSS瀏覽器重置的基本和常見的CSS代碼段

 
 
 
 
  1. html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
  2.      margin: 0;
  3.      padding: 0;
  4.      border: 0;
  5.      font-size: 100%;
  6.      font: inherit;
  7.      vertical-align: baseline;
  8.      outline: none;
  9.      -webkit-box-sizing: border-box;
  10.      -moz-box-sizing: border-box;
  11.      box-sizing: border-box;
  12. }
  13.  html {
  14.      height: 101%;
  15. }
  16.  body {
  17.      font-size: 62.5%;
  18.      line-height: 1;
  19.      font-family: Arial, Tahoma, sans-serif;
  20. }
  21.  article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
  22.      display: block;
  23. }
  24.  ol, ul {
  25.      list-style: none;
  26. }
  27.  blockquote, q {
  28.      quotes: none;
  29. }
  30.  blockquote:before, blockquote:after, q:before, q:after {
  31.      content: '';
  32.      content: none;
  33. }
  34.  strong {
  35.      font-weight: bold;
  36. }
  37.  table {
  38.      border-collapse: collapse;
  39.      border-spacing: 0;
  40. }
  41.  img {
  42.      border: 0;
  43.      max-width: 100%;
  44. }
  45.  p {
  46.      font-size: 1.2em;
  47.      line-height: 1.0em;
  48.      color: #333;
  49. }

跨瀏覽器透明度設置

 
 
 
 
  1. .transparent {    
  2.      -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";/* IE 8 */    
  3.      filter: alpha(opacity=50); /* IE 5-7 */    
  4.      -moz-opacity: 0.5;/* Netscape */    
  5.      -khtml-opacity: 0.5; /* Safari 1.x */   
  6.      opacity: 0.5;  /* Good browsers */
  7. }

常規(guī)媒體查詢

 
 
 
 
  1. /* Smartphones (portrait and landscape) ----------- */
  2.  @media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
  3.    
  4. }
  5. /* Smartphones (landscape) ----------- */
  6.  @media only screen and (min-width : 321px) {
  7.    
  8. }
  9. /* Smartphones (portrait) ----------- */
  10.  @media only screen and (max-width : 320px) {
  11.     
  12. }
  13. /* iPads (portrait and landscape) ----------- */
  14.  @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) {
  15.     
  16. }
  17. /* iPads (landscape) ----------- */
  18.  @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) {
  19.     
  20. }
  21. /* iPads (portrait) ----------- */
  22.  @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) {
  23.     
  24. }
  25. /* Desktops and laptops ----------- */
  26.  @media only screen and (min-width : 1224px) {
  27.    
  28. }
  29. /* Large screens ----------- */
  30.  @media only screen and (min-width : 1824px) {
  31.     
  32. }
  33. /* iPhone 4 ----------- */
  34.  @media only screen and (-webkit-min-device-pixel-ratio:1.5), only screen and (min-device-pixel-ratio:1.5) {
  35.    
  36. }

自定義選中文本

 
 
 
 
  1. ::selection {
  2.      background: #51a351;
  3. }
  4.  ::-moz-selection {
  5.      background: #51a351;
  6. }
  7.  ::-webkit-selection {
  8.      background: #51a351;
  9. }

帶CSS3的全屏背景

 
 
 
 
  1. html {
  2.      background: url('images/bg.jpg') no-repeat center center fixed;
  3.      -webkit-background-size: cover;
  4.      -moz-background-size: cover;
  5.      -o-background-size: cover;
  6.      background-size: cover;
  7. }

強制垂直滾動條

 
 
 
 
  1. html {
  2.      height: 101% 
  3. }

文本首字母大寫

 
 
 
 
  1. p:first-letter {
  2.      display: block;
  3.      margin: 4px 0 0 4px;
  4.      float: left;
  5.      color: #ff3366;
  6.      font-size: 5.3em;
  7.      font-family: Georgia, Times New Roman, serif;
  8. }

內外陰影

 
 
 
 
  1. #mydiv {
  2.      -moz-box-shadow: inset 2px 0 4px #000;
  3.      -webkit-box-shadow: inset 2px 0 4px #000;
  4.      box-shadow: inset 2px 0 4px #000;
  5. }
 
 
 
 
  1. #mydiv {
  2.      -webkit-box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.52);
  3.      -moz-box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.52);
  4.      box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.52);
  5. }

語音氣泡

 
 
 
 
  1. .speech-bubble {
  2.     position: relative;
  3.     background: #00aabb;
  4.     border-radius: .4em;
  5. }
  6.  
  7. .speech-bubble:after {
  8.     content: '';
  9.     position: absolute;
  10.     bottom: 0;
  11.     left: 50%;
  12.     width: 0;
  13.     height: 0;
  14.     border: 30px solid transparent;
  15.     border-top-color: #00aabb;
  16.     border-bottom: 0;
  17.     border-left: 0;
  18.     margin-left: -15px;
  19.     margin-bottom: -30px;
  20. }

自定義輸入樣式

 
 
 
 
  1. input[type=text], textarea {
  2.      -webkit-transition: all 0.30s ease-in-out;
  3.      -moz-transition: all 0.30s ease-in-out;
  4.      -ms-transition: all 0.30s ease-in-out;
  5.      -o-transition: all 0.30s ease-in-out;
  6.      outline: none;
  7.      padding: 3px 0px 3px 3px;
  8.      margin: 5px 1px 3px 0px;
  9.      border: 1px solid #ddd;
  10. }
  11.  input[type=text]:focus, textarea:focus {
  12.      box-shadow: 0 0 5px rgba(81, 203, 238, 1);
  13.      padding: 3px 0px 3px 3px;
  14.      margin: 5px 1px 3px 0px;
  15.      border: 1px solid rgba(81, 203, 238, 1);
  16. }

網站名稱:分享10個很實用的CSS的代碼片段
本文鏈接:http://www.5511xx.com/article/cceoehe.html