.banner {
width: 34px;
height: 52px;
position: relative;
color: white;
font-size: 11px;
letter-spacing: 0.2em;
text-align: center;
float: right;
padding-left: 10px;
padding-top: 4px;
}
.banner:after { # How can I make this same behavior work inline?
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 0;
height: 0;
border-top: 24px solid transparent;
border-bottom: 25px solid transparent;
border-left: 9px solid white;
}
这是产生的:
我怎样才能内联创建这个形状?
我尝试的一切都不起作用,因为看起来position
电子邮件不支持负边距。
将其用作图像,因为伪元素内容不会出现在 DOM 中。这些元素不是真正的元素。因此,大多数辅助设备无法使用它们。因此,切勿使用伪元素来生成对页面的可用性或可访问性至关重要的内容。
阅读更多 https://www.smashingmagazine.com/2011/07/learning-to-use-the-before-and-after-pseudo-elements-in-css/
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)