-webkit-tap-highlight-color:rgba(0,0,0,0);
这个属性只用于iOS (iPhone和iPad)。当你点击一个链接或者通过Javascript定义的可点击元素的时候,它就会出现一个半透明的灰色背景。要重设这个表现,你可以设置-webkit-tap-highlight-color为任何颜色。
想要禁用这个高亮,设置颜色的alpha值为0即可。
示例:设置高亮色为50%透明的红色:
-webkit-tap-highlight-color: rgba(255,0,0,0.5);
浏览器支持: 只有iOS(iPhone和iPad).
-webkit-font-smoothing,字体抗锯齿属性
对字体进行抗锯齿渲染可以使字体看起来会更清晰舒服。在图标字体成为一种趋势的今天,抗锯齿渲染使用也越来越多。
font-smoothing是非标准的CSS定义。它被列入标准规范的草案中,后由于某些原因从web标准中被移除了。
但是,我们可以用以下两种定义进行抗锯齿渲染
-webkit-font-smoothing: antialiased; /*chrome、safari*/
-moz-osx-font-smoothing: grayscale;/*firefox*/
(1)Webkit在自己的引擎中支持了这一效果。
-webkit-font-smoothing
它有三个属性值:
none ------ 对低像素的文本比较好
subpixel-antialiased------默认值
antialiased ------抗锯齿很好
例子:
body{
-webkit-font-smoothing: antialiased;
}
这个属性可以使页面上的字体抗锯齿,使用后字体看起来会更清晰。
加上之后就顿时感觉页面小清晰了。
(2)Gecko也推出了自己的抗锯齿效果的非标定义。
-moz-osx-font-smoothing: inherit | grayscale;
这个属性也是更清晰的作用。
例子:
.icon {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
(3)Ionic框架在样式中多加了一条font-smoothing: antialiased;
这是坐等font-smoothing标准化,有备无患么。 --------------------- 本文来自 嵐烨 的优快云 博客 ,全文地址请点击:https://blog.youkuaiyun.com/u014516981/article/details/52629476?utm_source=copy
blr:expression(this.onFocus=this.blur())
blr没有特殊意思,expression 条件,这句话的意思是链接 a 在获得焦点的同时失去焦点。如果你用的是图片链接什么的,他不会显示周边的虚线。 楼下的朋友,有三点需要重申一下 1.按下鼠标图片周边不会出现虚线,这个适合所有的浏览器 2.提问题的朋友使用的是css的写法,楼下的朋友是加入了script,还有更简单的写法,直接写在链接里<a href="#" οnfοcus=this.blur();>链接标题</a> --------------------- 本文来自 iBenxiaohai123 的优快云 博客 ,全文地址请点击:https://blog.youkuaiyun.com/ibenxiaohai123/article/details/75635195?utm_source=copy
eg:a { text-decoration: none; blr: expression(this.onFocus=this.blur()); }
-webkit-appearance: none
解释:http://www.w3cplus.com/css3/changing-appearance-of-element-with-css3.html
input::-webkit-input-placeholder { color: #999; }
在html5中input,textarea等元素新添加了placeholder的属性,我们可以通过css设置placeholder的样式,对于ie,firefox,以及webkit内核的浏览器需要使用不同的样式写法。
如下测试代码:
<!doctype html>
<html>
<head>
<style type="text/css">
#myInput::-webkit-input-placeholder { color: red;}
#myInput:-moz-placeholder { color: red;}
#myInput:-ms-input-placeholder { color: red;}
</style>
</head>
<body>
<input id='myInput' placeholder='hello'/>
<br>
<textarea id='myInput' placeholder='hello'></textarea>
</body>
</html> --------------------- 本文来自 xhreaishengming 的优快云 博客 ,全文地址请点击:https://blog.youkuaiyun.com/xhreaishengming/article/details/77676975?utm_source=copy