*新闻详情页*/>
1、自定文字挑选
::selection { background: red; color: black; }
2、除掉video的controls中的免费下载按键
video::-internal-media-controls-download-button { display:none; } video::-webkit-media-controls-enclosure { overflow:hidden; } video::-webkit-media-controls-panel { width: calc(100% + 30px); }
3、css3特点中的transform:translateZ(0)有哪些功效
GPU加快,提升前端开发特性
4、翻转条款式改动
/* * 能够换别的挑选器 */ *::-webkit-scrollbar { width: 2px; height: 2px; } *::-webkit-scrollbar-thumb { border-radius: 5px; box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); background: #00063a; } *::-webkit-scrollbar-track { box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); border-radius: 0; background: #00063a; }
5、input type number 掩藏左右按键
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; } input[type="number"]{ -moz-appearance: textfield; }
6、css渐变色虚框
<style> .box { width: 150px; border: 2px dashed #fff; background: linear-gradient(to bottom, #34538b, #cd0000); background-origin: border-box; } .content { height: 100px; background-color: #fff; } </style> <div class="box"> <div class="content"></div> </div>
7、border渐变色色圆弧
<style type="text/css"> .content { width: 100px; height: 100px; box-sizing: border-box; padding: 5px; border-radius: 50%; background-image: -webkit-linear-gradient(top, red 0%, blue 30%, yellow 60%, green 90%); background-image: -moz-linear-gradient(top, red 0%, blue 30%, yellow 60%, green 90%); background-image: linear-gradient(top, red 0%, blue 30%, yellow 60%, green 90%); } .box { width:100%; height:100%; border-radius:50%; background:#fff; } </style> <div class="content"> <div class="box"></div> </div>
8、键入框鼠标光标掉色,文本不会改变色
input{ caret-color: red; }
9、锥形渐变色
.box { width: 300px; height: 300px; background: conic-gradient(from 45deg, white, black, white); }
10、 text-decoration完成波浪纹线
wavy { display: block; height: .5em; white-space: nowrap; letter-spacing: 100vw; padding-top: .5em; overflow: hidden; } wavy::before { content: "\2000\2000"; /* IE访问器实线替代 */ text-decoration: overline; /* 当代访问器 */ text-decoration: overline wavy; }
11、css三角形
<style type="text/css" media="screen"> .div1{ width: 0; height: 0; border: 100px solid; <!--上右下左--> border-color: red transparent transparent transparent; } </style> <div class="div1"></div>
12、css情况渐变色与情况照片共存
background: url(https://img.alicdn.com/imgextra/i4/1881744325/O1CN01JBktT81hotb8c6Py0_!!1881744325.png) center no-repeat,linear-gradient(to bottom,red,#3c3f40);
13、自定访问器翻转条
/*界定翻转条宽高及情况,宽高分数别相匹配横纵翻转条的规格*/ ::-webkit-scrollbar { width: 5px; height: 5px; background-color: rgba(245, 245, 245, 0.47); } /*界定翻转条的路轨,内黑影及圆弧*/ ::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3); border-radius: 10px; background-color: #f5f5f5; } /*界定导轨滑块,内黑影及圆弧*/ ::-webkit-scrollbar-thumb { /*width: 10px;*/ height: 20px; border-radius: 10px; -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3); background-color: rgba(85, 85, 85, 0.25); }
14、更改placeholder的字体样式色调尺寸
input::-webkit-input-placeholder { /* WebKit browsers */ font-size:14px; color: #333; } input::-moz-placeholder { /* Mozilla Firefox 19+ */ font-size:14px; color: #333; } input:-ms-input-placeholder { /* Internet Explorer 10+ */ font-size:14px; color: #333; }
到此这篇有关css一些不普遍但很有效的特性实际操作全集的文章内容就详细介绍到这了,大量有关css 特性实际操作內容请检索脚本制作之家之前的文章内容或再次访问下边的有关文章内容,期待大伙儿之后多多的适用脚本制作之家!
Copyright © 2002-2020 怎么把小程序变成二维码_微信小程序怎么开通_微信小程序csdn_小程序开发_网络答题小程序 版权所有 (网站地图) 粤ICP备10235580号