How to add static text inside an input form

2020-06-03 07:18发布

How can I put this static text in an input form?

It's there all the time.

Enter image description here

This is my code:

<label for="subdomain">Subdomain:</label>
<input type="text" placeholder="ExampleDomain" id="subdomain"/>

7条回答
We Are One
2楼-- · 2020-06-03 08:04

In angular you can do this:

In the html file add placeholder attribute to input with text variable: <input type="time" class="timepicker" placeholder="{{text_variable}}">

In the css:

.timepicker:before {
    content:'.' attr(placeholder);
    margin-right:5px;
    color:#9d9d9d;
}
查看更多
登录 后发表回答