我想在输入表单的结尾侧用箭头(或三角形很好)复制这种外观。该图像是从旧Flash应用程序正被转换为HTML5: 把箭头或三角形放在行尾
我已经尽可能得到作为具有这样围绕所述输入字段中的线:
HTML
<form action="">
<div class="line">
<label>Cab Width =
<input type="number" id="cabWidth" name="cabWidth" min="30" max="57.5" step="0.125" value="32" autofocus> (decimal inches)
</label>
</div>
</form>
CSS
.line {
display: flex;
flex: 1;
width: 100%;
margin: 20px auto;
line-height: 1em;
}
.line:before, .line:after {
content: '';
flex-grow: 1;
margin: 0px 4px;
background: linear-gradient(black, black);
background-size: 100% 2px;
background-position: 0% 50%;
background-repeat: repeat-x;
}
但我无法弄清楚如何添加到这个CSS三角形或某种箭头的结尾。也许它不能完成。
希望我能解决这个问题的任何想法或指导。
制作一些图片,除非你不介意HTML实体字体不一致。 – PHPglue
我不确定我会介意HTML实体。像双角度引号在每一端都可能会很好,但我不知道如何将它们添加到行尾。 – BitBug