.big-title{
position: absolute;
left: 5;
top: 0;
padding: 9px;
background: #808080;
font-size: 30px;
border-radius: 40px;
box-shadow: 5px 0 white;
vertical-align: bottom;
}
.small-title{
padding: 9px;
margin-left: 40px;
background: #808080;
color: white;
border-radius: 40px;
line-height: 54px;
vertical-align: bottom;
}
这样能做个大概,但是没有原图顺滑。
又换了一种方案:思路是两个一样的JWC,一个背景色为白色,放于灰色背景的下面,然后left多一点点,但这样做出来还是不顺滑:
.big-title{
position: absolute;
left: 0;
top: 0;
padding: 9px;
background: #808080;
font-size: 30px;
border-radius: 40px;
vertical-align: bottom;
z-index: 20;
}
.placeholder{
position: absolute;
left: 3px;
top: 0;
padding: 9px;
background: white;
color: white;
font-size: 30px;
border-radius: 40px;
vertical-align: bottom;
}
.small-title{
padding: 9px;
margin-left: 30px;
background: #808080;
color: white;
border-radius: 40px;
line-height: 54px;
vertical-align: bottom;
}
解决方案3:感谢刘湿湿的提醒~
用border 解决了
.big-title{
position: absolute;
left: 0;
top: 0;
border: 2px solid white;
padding: 9px;
background: #808080;
font-size: 30px;
border-radius: 40px;
vertical-align: bottom;
z-index: 20;
}
.small-title{
padding: 9px;
margin-left: 30px;
background: #808080;
color: white;
border-radius: 40px;
line-height: 54px;
vertical-align: bottom;
}
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。