/* 毛边 */
div{
box-shadow: 0px 0px 5px #888888; /* 水平偏移 垂直偏移 毛边宽度 颜色 */
}
/* 裁剪元素 */
div{
position: absolute; //绝对定位是前提
clip: rect(0px 300px 100px 0px); /* 四个边框到原点的距离, 分别是上 右 下 左 */
}
/* 旋转 */
div{
transform: rotate(90deg); /* 顺时针90度 */
}
/* 背景图 */
div{
background: url('xxx.png') no-repeat 0px 0px; /* 路径 是否重复 水平偏移 垂直偏移 */
}
/* 文字超出部分隐藏 */
span{
white-space: nowrap;
}
/* 动画效果 */
/* 定义动画函数 */
@keyframes custom-animation{
from{
width: 0%;
}
to{
width: 100%;
}
}
div{
/* 动画函数 时间 速度函数 重复动画 */
animation: custom-animation 4s cubic-bezier(.23,1,.32,1) infinite;
}
css 样式
最新推荐文章于 2021-08-03 21:54:19 发布