CSS style reset and clear (to make different browsers display the same effect)

CSS style reset and clear (to make different browsers display the same effect)
In order to make the page display consistent between different browsers, CSS style clearing and resetting is a must for front-end development. Based on previous experience, we have compiled a CSS reset style code for reference.

Copy code
The code is as follows:

@charset "utf-8";
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, pre,
dl, dt, dd, ul, ol, li, th, td, div, span, img,
fieldset, lengend, button, input, select, textarea{margin: 0;padding: 0;}
/* color & background */
html{color:#000; background:#FFF;}
/* font */
body, button, input, select, textarea { /* for ie */
font: 12px/18px Arial, Verdana, Microsoft YaHei;
}
/* fix center */
html,body {height: 100%;margin: 0 auto;}
/* h1~h6 */
h1 {font-size: 18px;}
h2 {font-size: 16px;}
h3 {font-size: 14px;}
h4, h5, h6 {font-size: 100%;}
/* a */
a { text-decoration: none; }
a:hover { text-decoration: underline; }
/* list */
ul,ol {list-style: none;}
/* img border */
fieldset,img{border: 0}
/* table */
table {border-collapse: collapse;border-spacing: 0;font:inherit;}
/* margin */
.alpha {margin-left: 0;}
.omega {margin-right: 0;}
/* float & clear */
.left{float:left;}
.right{float:right;}
.clear {clear: both;display: block;}
/* clearfix */
.clearfix:after{content:".";display:block;}
.clearfix{display:inline-table;}
/* Hides from IE-mac */
* html .clearfix{height:1%;}
.clearfix{display:block;}
/* End hide from IE-mac */
*+html .clearfix{min-height:1%;}/* IE7 */

<<:  Using shadowsocks to build a LAN transparent gateway

>>:  Vue3+Vite+TS implements secondary encapsulation of element-plus business components sfasga

Recommend

How to add Nginx proxy configuration to allow only internal IP access

location / { index index.jsp; proxy_next_upstream...

Example of removing json backslash in php

1. Remove backslashes through the "stripslas...

VMware ESXi installation and use record (with download)

Table of contents 1. Install ESXi 2. Set up ESXi ...

What knowledge systems do web designers need?

Product designers face complex and large manufactu...

HTML implements read-only text box and cannot modify the content

Without further ado, I will post the code for you...

How to solve the mysql ERROR 1045 (28000)-- Access denied for user problem

Problem description (the following discussion is ...

Summary of vue's webpack -v error solution

Xiaobai learned about Vue, then learned about web...

Centos7 installation of FFmpeg audio/video tool simple document

ffmpeg is a very powerful audio and video process...

How to implement responsiveness in Vue source code learning

Table of contents Preface 1. Key Elements of a Re...

In-depth analysis of MySQL 8.0 redo log

Table of contents Preface Generation of redo log ...

Solve the error problem caused by modifying mysql data_dir

Today, I set up a newly purchased Alibaba Cloud E...

Detailed examples of Linux disk device and LVM management commands

Preface In the Linux operating system, device fil...