css0417

今天主要学习了背景颜色渐变,渐变时间,浮动,认识了盒模型 还有图片替换技术。

让我印象深刻的就是颜色渐变,代码如下:

.box3{width: 200px;
height: 200px;
background-color: red;
/*圆*/
/*border-radius: 50%;*/
/*元素阴影*/
/*X Y 模糊 外延 颜色*/
/*box-shadow: 5px 2px 5px 10px black;*/
background: linear-gradient(red,yellow);
/*background: linear-gradient(to right,red,yellow);*/
/*90deg 90°*/
/*background: linear-gradient(90deg red,yellow);*/
/*yellow开始渐变*/
/*background: linear-gradient(-90deg red,yellow);*/
/*径向渐变*/
/*background: radial-gradient(red,yellow);*/
/*background: radial-gradient(red 10px,yellow 15px);*/

/*谷歌、苹果。 ms 微软 moz 火狐 o 欧朋*/
/*-webkit-transition: all linear 2s;*/
/*-moz-transition: all linear 2s;*/
/*-o-transition:all linear 2s ;*/
/*不支持微软?-ms-transition 打不出 */
/*-ms-transition:all linear 2s ;*/
/*移入逐渐变色,移出逐渐变色*/
/*transition: all linear 2s;*/
/*宽度逐渐渐变*/
/*transition: width linear 2s;*/
/*1表示循环次数 infinite 无线循环 myAnimation动画命名 */
animation: myAnimation 2s infinite;
}
@keyframes myAnimation {
/*from{*/
/**/
/*}*/
/*to{*/
/**/
/*}*/
0%{
background-color: red;
}

/*20%{*/
/**/
/*}*/
/*40%{*/
/**/
/*}*/

/*60%{*/
/**/
/*}*/
/*80%{*/
/**/
/*}*/
/*100%{*/
/**/
/*}*/
}
.box3:hover{
/*width: 150px;*/
/**/
/*移入逐渐变色*/
/*transition: all linear 2s;*/

}

转载于:https://www.cnblogs.com/zhangchuan09/p/6725304.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值