Copy code The code is as follows:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Perfect vertical centering of form elements</title> <style type="text/css"> *{padding:0; margin:0;} body{font:14px/1.231 Tahoma, Geneva, sans-serif; background-color:#D1D5E7;} label{cursor:pointer; vertical-align:middle;} input{vertical-align:middle; margin:5px;} .warp{ margin:100px 350px;} span{ vertical-align:middle; text-decoration:underline;} img{ vertical-align:middle; border:1px solid #CCF;_margin-bottom:1px;} p{font-size:14px;} h2{font-size:16px;} </style> </head> <body> <div class="warp"> <h2>Radio boxes and check boxes are very small and not easy to click, which causes confusion for many users and a poor user experience</h2> <p>Please see the perfect solution of [A touch of coolness]: Perfect vertical centering, click on the text to select it, shortcut key to select it, mouse over the text to show hand shape (implying clickable)</p> <input name="aaa" id="aaa" type="checkbox" value=""/> <label for="aaa">X×I am a perfect checkbox</label> <input name="ccc" id="ccc" type="checkbox" accesskey="2" value=""/> <label for="ccc">I support keyboard Alt+2 selection (<span>2</span>)</label> <input name="bbb" id="bbb" type="radio" value=""/><label for="bbb">X×I am a perfect radio button</label> <label for="fff">X×I am a perfect text box</label><input id="fff" type="text"/> <input name="eee" id="eee" type="checkbox" value=""/><span>Pictures can also be centered</span><img width="270" height="129" usemap="#mp" src="upload/2022/web/baidu_sylogo1.gif"/> </div> </body> </html> |
<<: MySQL slave library Seconds_Behind_Master delay summary
>>: Implementation steps for enabling docker remote service link on cloud centos
Function Origin I was recently working on an H5 t...
privot is the intermediate table of many-to-many ...
1. First look at the request configuration file, ...
Set the background image for the table header. Yo...
1. Download address: http://dev.mysql.com/downloa...
After installing the database, if you accidentall...
[Usage and function of mysql cursor] example: The...
After installing the MySQL database using the rpm...
Preface Locks are synchronization mechanisms used...
Earlier we talked about how to make a square with...
Table of contents Preface The value of front-end ...
CSS transformations, while cool, have not yet bee...
Before using idea to write JSP files, you need to...
In this article, we will learn about the optimiza...
In the process of using Vue to develop projects, ...