当前位置:网站首页>Modify placeholder style in input
Modify placeholder style in input
2022-07-27 18:39:00 【mr_ cmx】
Implementation method : Use ::placeholder” Selectors
::placeholder yes css3 New selector , There may be some browser compatibility problems , So it's best to add different prefixes -ms- 、 -webkit- 、-ms- etc.
input::placeholder {
font-weight: 400;
color: #624b2f;
}
//::-webkit-input-placeholder/* WebKit, Blink, Edge */
//:-moz-placeholder/* Mozilla Firefox 4 to 18 */
//::-moz-placeholder /* Mozilla Firefox 19+ */
//:-ms-input-placeholder /* Internet Explorer 10-11 */
//::-ms-input-placeholder /* Microsoft Edge */
So you can set up placeholder Font size of 、 Color style
If wechat applet is modified input in placeholder There are two styles :
1、 Use placeholder-class
wxml in :
<input type="text" placeholder=" Here is placeholder The content of " placeholder-class="placeholderClass"/>
wxss in :
.placeholderClass{
font-weight: 400;
color: #624b2f;
}
2、 Use placeholder-style
wxml in :
<input type="text" placeholder=" Here is placeholder The content of " placeholder-style="color: #624b2f;"/>
It feels like one uses the class name and the other uses the inline style
边栏推荐
- The second parameter of fragmenttransaction.replace reports an error
- MySQL learns the relationship between Day2 Sorting Query / aggregation function / grouping query / paging query / constraint / multiple tables
- [mit 6.s081] LEC 4: page tables notes
- MySQL学习 Day1 DDL、DML、DQL基础查询
- [MIT 6.S081] Lab 9: file system
- [MIT 6.S081] Lab 11: networking
- 知识图谱 — pyhanlp实现命名体识别(附命名体识别代码)
- [MIT 6.S081] Lec 9: Interrupts 笔记
- The end of another era!
- [MIT 6.S081] Lab8: locks
猜你喜欢
随机推荐
Deep learning: stgcn learning notes
Binary tree concept
Deep learning: gat
Intel releases a new generation of movidius Vpu: 10 times higher performance and 30W power consumption
"Who is Huawei" documentary film series landing on BBC: exposing a large number of Ren Zhengfei's unknown experience
Graphical interface programming
Deep learning - paper reading: action structural graph convolution network as-gcn
Disassembly of Xiaomi cc9 Pro: the cost of rear five shots is several times that of Xiaolong 855!
2021.8.1 Notes database design
2. Change color space and color detection
常用词词性表
[mit 6.s081] LEC 9: interrupts notes
Build a simple knowledge question and answer system
@Considerations for query of convert annotation in JPA
[MIT 6.S081] Lec 4: Page tables 笔记
搭建一个简单的知识问答系统
[MIT 6.S081] Lab 9: file system
XML learning Day1: XML / jsup parser / selector /xpath selector
Why don't you like it? It's easy to send mail in ci/cd
Deep learning: installation package records









