[英]How to create text effect like this (HTML/ CSS)? Text with caret
span::before { content: "∨"; position: absolute; left: 1em; top: 1.2em; }
<span>text</span>
You may have to edit the positioning to get it in the right spot, but the key here is using a before
pseudo-element with content: "∨"
.您可能需要编辑定位以使其位于正确的位置,但这里的关键是使用content: "∨"
的before
伪元素。
Can you try something like this, for pure CSS?对于纯 CSS,你能尝试这样的事情吗?
<div class='parent'>
<div class='caret'>v</div>
<div class='added-text'>a lot of</div>
<div class='main-text'>Save time with a quick solution</div>
</div>
.parent {
position: absolute;
}
.added-text {
padding-left: 10px;
}
.main-text {
}
.caret {
position: absolute;
top: 15px; <-- might need some custom tuning
left: 24px; <-- might need some custom tuning
}
Without sharing any details or what you have done so far, it leaves infinite options.在不分享任何细节或您到目前为止所做的事情的情况下,它留下了无限的选择。 Here's one.这是一个。
p { font-family: Arial, sans-serif; font-size: 36px; margin-top: 50px; position: relative; } span { position: absolute; left: 15px; top: -60px; } span::before { content: "\2228"; color: #00f; font-size: 50px; left: 62px; position: relative; top: 32px; }
<p>Save <span>a lot of </span> time with a quick solution</p>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.