


What are the built-in styles of html elements and how to remove them?
html elements have default styles. Methods to remove them: 1. Remove the default style globally, the code is [*{padding:0;margin:0;box-sizing:..}]; 2. Remove the a tag The default style, code is [a{text-decoration: none;color:#3].
The operating environment of this tutorial: windows7 system, html5 version, DELL G3 computer.
html elements have default styles, how to remove them:
1. Remove default styles globally
*{padding:0;margin:0;box-sizing: border-box;font-size: 14px;}
2. Remove default styles from a tag
a{text-decoration: none;color:#333;} a:hover, a:visited, a:link, a:active { color:#333; // 设置使所有a标签的四种状态都和本身颜色保持一致,样式代码自己写 }
3、li
ul,ol{list-style: none;}
4、img
img{ vertical-align:top; border:none; }
5、button
.button{ border:0; background-color:none outline:none; -webkit-appearance: none;//用于IOS下移除原生样式 }
6、select
select { border: none; appearance:none; -moz-appearance:none; -webkit-appearance:none; /*在选择框的最右侧中间显示小箭头图片*/ background: url("http://ourjs.github.io/static/2015/arrow.png") no-repeat scroll right center transparent; padding-right: 14px; }
7、h1
h1,h2,h3,h4,h5,h6{font-weight:normal;}
8, input, textarea
input,textarea { outline: none; border: none; } textarea { resize: none; overflow: auto; }
9, italics i
i{font-style: normal;}
10, table
table{border-collapse:collapse;border-spacing:0;}
11, remove input[type=number] plus and minus signs
/*去除input[type=number]加减号*/ /* 谷歌 */ input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; } /* 火狐 */ input{ -moz-appearance:textfield; }
Related learning recommendations: html video tutorial
The above is the detailed content of What are the built-in styles of html elements and how to remove them?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.
