直接上代码
.layui-form-label.layui-required:after{
content:"*";
color:red;
position: absolute;
top:5px;
left:15px;
}
<div class="layui-form">
<div class="layui-form-item">
<label class="layui-form-label layui-required">消息标题:</label>
<div class="layui-input-block">
<input type="text" name="name" autocomplete="off" placeholder="请输入消息标题" class="layui-input">
</div>
</div>
</div>
效果
原文地址:https://www.cnblogs.com/richerdyoung/p/12024869.html
时间: 2024-11-14 13:07:33