-1

我正在尝试使用placeholder具有以下样式的 html 属性,其中将出现无序列表、订单列表、段落、粗体文本:

Please provide social Combo offer details
For social combo lease enable or add your social media button on site
1. tweets / retweet url : website url where tweet button is enabled or twitter tweet 
   url
2. fb share : website url
3. google plus : website url

有没有办法在 htmlplaceholder属性上显示这种样式?

4

2 回答 2

1

如果要设置占位符属性的样式,则需要使用以下 CSS

:-moz-placeholder {
    font-weight: bold;
}
::-webkit-input-placeholder {
    font-weight: bold;
}
::-moz-placeholder {
    font-weight: bold;
}
:-ms-input-placeholder {
    font-weight: bold;
}
于 2013-04-29T07:57:20.143 回答
1

placeholder与任何 HTML 属性一样,该属性将纯文本作为其值;那里不会识别任何标记。因此,您不能在其中放置例如 HTML 列表。

它旨在用作简短的占位符文本,而不是解释。您应该将填写说明放在页面的正常内容中,最好是在表格之前或相关字段之前。

于 2013-04-29T07:57:40.567 回答