In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to use html5 with css3 to achieve with prompt text input box, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!
When the dialog box is selected, the prompt text becomes lighter and disappears after input. It is now common practice to add a Label after the Input tag. Use JS control.
With the advent of HTML5, we have a better way.
We see that there is a placeholder tag that can be used as a user text prompt. This is very convenient. But in order to be perfect, we need to lighten the text or change the style of the prompt file after it is selected. what should we do?
Input::-webkit-input-placeholder {color: # 999Take WebkitMutual: color.5s;} input:focus::-webkit-input-placeholder, input:hover::-webkit-input-placeholder {color: # c2c2c2witch: color.5s;}
-A css unique to webkit-input-placeholder,webkit can control the text style inside. With the animation effects and pseudo-classes of css3, we can easily make a drawing input box, which is very suitable for system login, search and other locations. Of course, if you want to be compatible with IE6, this method won't work. However, Ie9 also supports placeholder tags, but you just can't change its color.
The above is all the content of this article "how to use html5 with css3 to realize the input box with prompt text". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.