In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to write the code of the HTML search bar". In the daily operation, I believe that many people have doubts about how to write the code of the HTML search bar. The editor has consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how to write the code of the HTML search bar". Next, please follow the editor to study!
1. Simple book category
Realize the effect
Html code
Css code
* {margin: 0; padding: 0;}. Container {height: 70px; width: 800px; margin: 100px auto 0 auto;}. Parent {position: relative;}. Search {width: 300px; height: 40px; border-radius: 18px; outline: none; border: 1px solid # ccc; padding-left: 20px; position: absolute;}. Btn {height: 35px; width: 35px; position: Background: url ("images/topbar.png") no-repeat-2px-99px; top: 6px; left: 285px; border: none; outline: none; cursor: pointer;} 2. Baidu category
Realize the effect
Html code
Css code
Key points:
1. When the input box foucus, the border color changes instead of keeping the outline
2.button button default box-sizing: border-box
.container {width: 500px; height: 50px; margin: 100px auto;} .parent {width: 100%; height: 42px; top: 4px; position: relative } .parent > input:first-of-type {/ * input box height is set to 40px, border occupies 2px, the total height is 42px*/ width: 380px; height: 40px; border: 1px solid # ccc; font-size: 16px; outline: none } .parent > input:first-of-type:focus {border: 1px solid # 317ef3; padding-left: 10px;} .parent > input:last-of-type {/ * button button border does not occupy the peripheral size, set the height 42px*/ width: 100px Height: 44px; position: absolute; background: # 317ef3; border: 1px solid # 317ef3; color: # fff; font-size: 16px; outline: none At this point, the study on "how to write the code of the HTML search bar" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.