CSS之不常用但重要的样式总结

1,设置颜色渐变

background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.67), rgba(255, 255, 255, 0));(从上到下的颜色渐变)
background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.71));(设置圆周渐变,从外到里)

2,设置背景图片

① background: url("") 0 0 no-repeat;(URL的值可以是图片所在路径、地址链接或base64编码)
② background: url("") no-repeat center;
③ background-image: url("");
background-repeat: no-repeat;

background-position: 50% 50%;
background-size: 100% 100%;

3,css样式实现播放暂停、开始按钮

 ① 开始按钮(竖立的等于号效果)

&:before {
width: 5px;
height: 16px;
background: #fff;
position: absolute;
content: "";
left: 16px
}
&:after {
width: 5px;
height: 16px;
background: #fff;
position: absolute;
content: "";
right: 16px
}
② 暂停按钮(三角形)
&:before {
width: 0;
height: 0;
border-left: 15px solid #fff;
border-right: 15px solid transparent;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
position: absolute;
content: "";
left: 6px;
}
 
 

转载于:https://www.cnblogs.com/chenbeibei520/p/10251790.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值