簡體   English   中英

HTML的占位符屬性在IE10中無法正常工作

[英]Placeholder property of HTML not working properly in IE10

請考慮以下代碼。

<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
     <input type="text" name="fname" placeholder="First name"><br>
</body>
</html>

在Chrome和Firefox中可以正常運行。 但是在IE 10中,占位符文本以斜體顯示。 我想要IE10中正常字體樣式的占位符文本。

在IE中,您可以按以下方式設置占位符的樣式:

input:-ms-input-placeholder {
    font-style:normal
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM