切图常用样式

1、 vertical-align: middle; 把此元素位置放在父元素中部
2、元素前加一个块级元素:

.class::befoer{
    content:"";
    display: inline-block;
    width:10px;
    height:10px;
    
}

3、旋转、过渡:

 -webkit-transform: translateX(-50%) scale(0);
  -moz-transform: translateX(-50%) scale(0);
  -o-transform: translateX(-50%) scale(0);
  -ms-transform: translateX(-50%) scale(0);
  transform: translateX(-50%) scale(0);
  
  -webkit-transition: transform 0.4s, opacity 0.4s;
  -moz-transition: transform 0.4s, opacity 0.4s;
  -o-transition: transform 0.4s, opacity 0.4s;
  -ms-transition: transform 0.4s, opacity 0.4s;
  transition: transform 0.4s, opacity 0.4s;

4、字体转换

  text-transform: uppercase;
  font-family: Arial;

5、元素的透明度:

  opacity: 0.1;

6、字体之间的间距:

  letter-spacing: 19px;

7、内容超出隐藏、不换行:

overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;

8、背景颜色从中间到两边过渡:

.service .fwNav a{
  float: left;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 160px;
  height: 45px;
  border-radius: 22px;
  border: solid 1px #f0f0f0;
  margin-left: 10px;
  margin-top: 10px;
  text-align: center;
  line-height: 43px;
  padding: 0 5px;
  color: #6d6d6d;
  font-size: 15px;
  background-repeat: no-repeat;
  background-image: -webkit-linear-gradient(left, #019959, #019959);
  background-image: linear-gradient(to right, #019959, #019959);
  background-size: 0% 100%;
  background-position: center center;
  -webkit-transition: all 0.5 ease-out;
  transition: all 0.5 ease-out;
}
.service .fwNav a:hover{
  background-size: 100% 100%;
  color: #fff;
  border-color: #019959;
}

9、过渡效果:越来越慢

 -webkit-transition:all 0.5s ease-out;
  transition: all 0.5s ease-out;

10、超出隐藏 超过两行之后省略号

  display: -webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值