關於css取消a標籤在移動端上點擊時背景顏色的執行個體分析

來源:互聯網
上載者:User
一、取消a標籤在移動端點擊時的藍色

-webkit-tap-highlight-color: rgba(255, 255, 255, 0);-webkit-user-select: none;-moz-user-focus: none;-moz-user-select: none;  

二、使用圖片作為a標籤的點擊按鈕時,當觸發touchstart的時候,往往會有一個灰色的背景

a,a:hover,a:active,a:visited,a:link,a:focus{    -webkit-tap-highlight-color:rgba(0,0,0,0);    -webkit-tap-highlight-color: transparent;    outline:none;    background: none;    text-decoration: none;}

  
三、改變選中內容的背景顏色

::selection {     background: #FFF;     color: #333; } ::-moz-selection {     background: #FFF;     color: #333; } ::-webkit-selection {     background: #FFF;     color: #333; }

  四、去除ios input框點擊時的灰色背景

-webkit-tap-highlight-color:rgba(0,0,0,0);
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.