Home > Web Front-end > HTML Tutorial > select 的 placeholder_html/css_WEB-ITnose

select 的 placeholder_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 08:49:30
Original
1603 people have browsed it

select的placeholder其实是无效的。所以很多人想了一些奇技淫巧,比如利用HTML的标签:

XML/HTML代码

<select>      <option value="" disabled selected hidden>Please Choose</option>      <option value="0">Open when powered (most valves do this)</option>      <option value="1">Closed when powered, auto-opens when power is cut</option>  </select>  
Copy after login

这样就可以看得到,但点击下拉框的时候,就不在选项里了,可以到这里看效果:http://cssdeck.com/labs/hxovifav,

但其实这不应该出现在前端面前,prompt不就是针对select的吗?

select的placeholder的属性确实无效,它应该使用prompt!!!

象上面的代码就应该写成:

XML/HTML代码

<select prompt="Plaese Choose">      <option value="0"> 0 </option>      <option value="1" 1 </option>  </select>  
Copy after login

很多资料里都应该有吧?

转发到朋友圈:

本站采用版权协议, 要求署名、非商业和保持一致. 本站欢迎任何非商业应用的转载, 但须注明出自"

", 保留原始链接, 此外还必须标注原文标题和链接.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template