css样式

flex上下左右居中

display: flex;
flex-direction: row; // 子元素横向排列    垂直column
justify-content: center; // 水平居中
align-items: center; // 垂直居中

文本超出n行隐藏且显示省略号

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 5; // 超出几行显示省略号,这里就写几
  -webkit-box-orient: vertical;
}

border-radius,给某个角单独设置radius

border-top-left-radius // 左上角
border-top-right-radius //右上角
border-bottom-right-radius //右下角
border-bottom-left-radius //左下角

选择相同class名的最后一个js写法

.xxx:last-child{ }

Border 虚线边框

border: 1px dashed red;   
<!-- solid 默认实线,dashed 虚线 -->

Css 背景色渐变

background: linear-gradient(to bottom right, yellow, red);

从黄色向红色(右下方向)渐变

如果是向右,就是直接 to right

background: linear-gradient(to bottom right, #FFF3DE, #fff 40%, #fff)

字体斜体

font-style: italic;

字体删除线

text-decoration: line-through;

v-html的图片溢出问题

v-html="内容.replace(/<img/g, '<img style=max-width:100%;height:auto;')"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值