简体   繁体   中英

How to Style each sentence differently to one placeholder

i was styling the place holder and i use ..

::-webkit-input-placeholder{
font-family: 'Source Sans Pro', sans-serif;
color: #535252!important;
font-size: 18px;
position: relative;
bottom: 03px;
font-weight: 600;
}

But that is one style , how can i apply multiple styles in one place Holder as you can see in the picture

在此处输入图片说明

Looks like it's more complex (not only input element). Something like this:

<div class="wrapper">
    <label class="prefix">
        Prefix:
    </label>
    <input type="text" placeholder="placeholder" />
</div>

and a css:

div.wrapper {
border: 1px solid blue;
width: 300px;
padding: 4px;
}

div.wrapper input {
border: 0 none;
background-color: transparent;
outline: none;
}

See example

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM