Home Web Front-end CSS Tutorial css optimization text box and button code

css optimization text box and button code

Aug 14, 2017 pm 02:54 PM
css code

An example of CSS form beautification of text boxes and buttons

1. First, let’s take a look at the true colors of buttons and text boxes that often appear on web pages!

css optimization text box and button code
Comparing the above picture, how can we change the appearance of the text box and button? Below I provide you with two text box and button styles as examples. The first one is that the text box and button have no three-dimensional effect, but only have line color and fill color. You may have seen this effect on many websites. However, it gives people a special feeling, which is very good. The second effect is more special. It makes the text box have an effect similar to underline and is colored. At the same time, the background color of the button is no longer It's gray, but it's colored. It can be said that this is a very cool effect. Okay, let me talk about the detailed steps to achieve these two effects.

2. Text boxes and buttons without three-dimensional effects

Then we will take the editing operation of the web page in DW3 as an example to illustrate. First, we have already edited the web page. Corresponding form objects are inserted into it, such as inserting a text box and a button. At this time, we press the [F10] key to display the web page source code editing window. Then we edit the and tags:



From the style sheet above It can be seen that this effect is achieved through two styles, one for the text box and one for the button. Therefore, two different codes need to be inserted into the htm statements of the text box and button. In the text Inserted in the box is the class=smallInput code.
 For example, ,
In the button statement, class="buttonface" code is inserted, as in the example
 
In fact, this corresponds to the style of the text box and button in the style sheet. The final effect is as shown below:


css optimization text box and button code


Take a look at the above effect. Does it still remind you of the monotonous text boxes and buttons? The above two effects are achieved through style sheets, and the usage methods are also very simple.

The production of forms is the focus of web development. Through forms, interaction and communication can be achieved, and information collection and sharing can also be achieved. The two articles above discussed it from the perspective of semantics and structure. You You can also participate in discussions and learning!

The above is the detailed content of css optimization text box and button code. For more information, please follow other related articles on the PHP Chinese website!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to implement the custom table function of clicking to add data in dcat admin? How to implement the custom table function of clicking to add data in dcat admin? Apr 01, 2025 am 07:09 AM

How to implement the table function of custom click to add data in dcatadmin (laravel-admin) When using dcat...

The latest ranking list of virtual currency trading platform APP (inventory of top 10 virtual currency trading platforms) The latest ranking list of virtual currency trading platform APP (inventory of top 10 virtual currency trading platforms) Mar 04, 2025 pm 03:51 PM

This article lists the top ten leading cryptocurrency exchanges in the world, including OKX, Binance, Gate.io, Huobi, Kraken, Coinbase, KuCoin, Crypto.com, Bitfinex and Bitstamp. With their strong technical strength, rich product lines, strict compliance operations and innovative ecological construction, these exchanges have taken the lead in the global cryptocurrency market. The article will introduce their special functions, technical architecture, security measures, compliance qualifications and ecosystem construction respectively, providing reference for investors to choose a suitable trading platform.

Share the top ten official website addresses of the world's formal virtual currency trading software in 2025 Share the top ten official website addresses of the world's formal virtual currency trading software in 2025 Feb 15, 2025 pm 04:42 PM

With the development of the cryptocurrency market, formal virtual currency trading software has become the focus of investors' attention. In the fierce competition, some trading platforms stand out and provide safe and reliable services. According to industry research and comprehensive rankings, this article will list the top ten best virtual currency trading software in the world in 2025 and provide its official website address. These platforms have been strictly reviewed and are designed to provide users with excellent trading experience and investment guarantees.

What exactly is Bitstamp exchange like? Is Bitstamp exchange safe? What exactly is Bitstamp exchange like? Is Bitstamp exchange safe? Aug 16, 2024 pm 06:02 PM

The Bitstamp exchange is known for its security and reliability, boasting the following features: Cold Storage and Multi-Signature: Most funds are stored offline, requiring multiple authorizations to approve transactions. Compliance and Regulation: Regulated by the Luxembourg Financial Regulatory Commission and compliant with anti-money laundering and KYC regulations. Network security measures: including DDoS protection, SSL encryption and regular security audits. Insurance and Fund Protection: Theft or loss is insured by Lloyd's of London and has a backup fund to protect user funds. Customer support and response: 24/7 customer support, right on the matter

Dynamic web page elements XPath and Class names change frequently. How to stably crawl the target a tag? Dynamic web page elements XPath and Class names change frequently. How to stably crawl the target a tag? Apr 01, 2025 pm 04:12 PM

Dynamic web element crawling problem: dealing with XPath and Class name changes, many crawler developers will encounter a difficult problem when crawling dynamic web pages: the goal...

What software is used to make bean bags? What software is used to make bean bags? Nov 27, 2024 am 11:39 AM

"Doubao" is a powerful AI assistant with complex software architecture and technical support behind it. The core of the architecture is a large language model (LLM) and image generation model, and also includes modules such as natural language processing, multi-modal generation, user interface, data storage and cloud computing platform. These modules adopt a microservices architecture and are developed using programming languages ​​such as Python, Java, C, etc. The architecture is still evolving, and more advanced AI technology may be introduced in the future to improve the performance and functionality of “Bean Bao”.

How to share the same page on the PC and mobile side and handle cache issues? How to share the same page on the PC and mobile side and handle cache issues? Apr 01, 2025 pm 01:57 PM

How to share the same page on the PC and mobile side and handle cache issues? In the nginx php mysql environment built using the Baota background, how to make the PC side and...

From PHP to Go or Front-end? The suggestions and confusions of reality from experienced people From PHP to Go or Front-end? The suggestions and confusions of reality from experienced people Apr 01, 2025 pm 02:12 PM

Confusion and the cause of choosing from PHP to Go Recently, I accidentally learned about the salary of colleagues in other positions such as Android and Embedded C in the company, and found that they are more...

See all articles