本节介绍css的背景属性以及应用效果css常用的背景属性背景应用css3新增背景属性css常用背景属性css中的背景是由background属性来设置背景的,它是一个综合属性,可以拆分为单一的属性背景
顺晟科技
2021-10-01 14:31:21
198
一、取消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);
07
2022-10
20
2022-09
15
2022-09
15
2022-09
15
2022-09
14
2022-09