css使用box-decoration-break实现文本多行样式克隆复制效果代码
代码语言:html
所属分类:布局界面
代码描述:css使用box-decoration-break实现文本多行样式克隆复制效果代码
代码标签: 使用css box-decoration-break 文本 多行 样式 克隆 复制
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
.wrapper{
width: min(calc(100% - 2rem), 38ch);
}
p{
/*position: relative;*/
background: var(--clr-secondary);
/*border: 1px solid var(--clr-primary);*/
padding: .5rem 1rem;
border-radius: 8px;
font-size: 1.6rem;
display: inline;
line-height: 2.2;
text-wrap: pretty;
/* this is the magic part */
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
/*
p::after{
content: '';
position: absolute;
width: 20px;
height: 20px;
background: red;
z-index: 1;
border-radius: 50%;
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0