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

Extract specific file paths in folders based on Linux commands

Recently, there is a need to automatically search...

Detailed explanation of the buffer pool in MySQL

Everyone knows that data in MySQL needs to be wri...

jQuery Ajax chatbot implementation case study

Chatbots can save a lot of manual work and can be...

Detailed explanation of the solution to docker-compose being too slow

There is only one solution, that is to change the...

Summary of the use of MySQL date and time functions

This article is based on MySQL 8.0 This article i...

Element avatar upload practice

This article uses the element official website an...

CentOS 6 Compile and install ZLMediaKit analysis

Install ZLMediaKit on centos6 The author of ZLMed...

How to install nginx in docker and configure access via https

1. Download the latest nginx docker image $ docke...

Summary of Mysql update multi-table joint update method

Next, I will create two tables and execute a seri...

Detailed explanation of the role of key in React

Table of contents Question: When the button is cl...

11 Linux KDE applications you didn't know about

KDE Abbreviation for Kool Desktop Environment. A ...

How to configure SSL for koa2 service

I. Introduction 1: SSL Certificate My domain name...

Detailed explanation of CSS3 animation and new features of HTML5

1. CSS3 animation ☺CSS3 animations are much easie...