찾다
웹 프론트엔드CSS 튜토리얼CSS Rest(스타일 재설정) 권장사항

CSS 재설정은 기본 스타일을 재설정하는 것을 의미합니다. HTML의 대부분의 태그 요소에는 웹 페이지 표시에 기본 속성 값이 있습니다. 일반적으로 요소 스타일을 반복적으로 정의하지 않으려면 기본 스타일을 재설정(CSS 재설정)해야 합니다. 몇 가지 예를 들면 다음과 같습니다.

1. Taobao(CSS 재설정):

html {
	overflow-x: auto;
	overflow-y: scroll;
}

body, dl, dt, dd, ul, ol, li, pre, form, fieldset, input, p, blockquote, th, td {
	font-weight: 400;
	margin: 0;
	padding: 0;
}

h1, h2, h3, h4, h4, h5 {
	margin: 0;
	padding: 0;
}

body {
	background-color: #FFFFFF;
	color: #666666;
	font-family: Helvetica,Arial,sans-serif;
	font-size: 12px;
	padding: 0 10px;
	text-align: left;
}

select {
	font-size: 12px;
}

table {
	border-collapse: collapse;
}

fieldset, img {
	border: 0 none;
}

fieldset {
	margin: 0;
	padding: 0;
}

fieldset p {
	margin: 0;
	padding: 0 0 0 8px;
}

legend {
	display: none;
}

address, caption, em, strong, th, i {
	font-style: normal;
	font-weight: 400;
}

table caption {
	margin-left: -1px;
}

hr {
	border-bottom: 1px solid #FFFFFF;
	border-top: 1px solid #E4E4E4;
	border-width: 1px 0;
	clear: both;
	height: 2px;
	margin: 5px 0;
	overflow: hidden;
}

ol, ul {
	list-style-image: none;
	list-style-position: outside;
	list-style-type: none;
}

caption, th {
	text-align: left;
}

q:before, q:after, blockquote:before, blockquote:after {
	content: ””;
}html {
	overflow-x: auto;
	overflow-y: scroll;
}

body, dl, dt, dd, ul, ol, li, pre, form, fieldset, input, p, blockquote, th, td {
	font-weight: 400;
	margin: 0;
	padding: 0;
}

h1, h2, h3, h4, h4, h5 {
	margin: 0;
	padding: 0;
}

body {
	background-color: #FFFFFF;
	color: #666666;
	font-family: Helvetica,Arial,sans-serif;
	font-size: 12px;
	padding: 0 10px;
	text-align: left;
}

select {
	font-size: 12px;
}

table {
	border-collapse: collapse;
}

fieldset, img {
	border: 0 none;
}

fieldset {
	margin: 0;
	padding: 0;
}

fieldset p {
	margin: 0;
	padding: 0 0 0 8px;
}

legend {
	display: none;
}

address, caption, em, strong, th, i {
	font-style: normal;
	font-weight: 400;
}

table caption {
	margin-left: -1px;
}

hr {
	border-bottom: 1px solid #FFFFFF;
	border-top: 1px solid #E4E4E4;
	border-width: 1px 0;
	clear: both;
	height: 2px;
	margin: 5px 0;
	overflow: hidden;
}

ol, ul {
	list-style-image: none;
	list-style-position: outside;
	list-style-type: none;
}

caption, th {
	text-align: left;
}

q:before, q:after, blockquote:before, blockquote:after {
	content: ””;
}

2. Baidu(CSS 재설정):

body {
	font-family: arial,helvetica,sans-serif;
	font-size: 13px;
	font-size-adjust: none;
	font-stretch: normal;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
	line-height: 1.4;
	text-align: center;
}

body, ul, ol, dl, dd, h1, h2, h3, h4, h5, h6, p, form, fieldset, legend, input, textarea, select, button, th, td {
	margin: 0;
	padding: 0;
}

h1, h2, h3, h4, h5, h6 {
	font-size: 100%;
	font-weight: normal;
}

table {
	font-size: inherit;
}

input, select {
	font-family: arial,helvetica,clean,sans-serif;
	font-size: 100%;
	font-size-adjust: none;
	font-stretch: normal;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
	line-height: normal;
}

button {
	overflow: visible;
}

th, em, strong, b, address, cite {
	font-style: normal;
	font-weight: normal;
}

li {
	list-style-image: none;
	list-style-position: outside;
	list-style-type: none;
}

img, fieldset {
	border: 0 none;
}

ins {
	text-decoration: none;
}

3 "CSS 재설정):

/* Normalizes margin,padding */

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td {
	margin: 0;
	padding: 0
}

/* Normalizes font-size for headers */

h1,h2,h3,h4,h5,h6 {
	font-size: 100%
}

/* Removes list-style from lists */

ol,ul {
	list-style: none
}

/* Normalizes font-size and font-weight to normal */

address,caption,cite,code,dfn,em,strong,th,var {
	font-size: normal;
	font-weight: normal
}

/* Removes list-style from lists */

table {
	border-collapse: collapse;
	border-spacing: 0
}

/* Removes border from fieldset and img */

fieldset,img {
	border: 0
}

/* Left-aligns text in caption and th */

caption,th {
	text-align: left
}

/* Removes quotation marks from q */

q:before,q:after {
	content: ”
}

4.Eric Meyer(CSS Reset)——推荐:

html, body, div, span, applet, object, iframe,

h1, h2, h3, h4, h5, h6, p, blockquote, pre,

a, abbr, acronym, address, big, cite, code,

del, dfn, em, font, img, ins, kbd, q, s, samp,

small, strike, strong, sub, sup, tt, var,

b, u, i, center,

dl, dt, dd, ol, ul, li,

fieldset, form, label, legend,

table, caption, tbody, tfoot, thead, tr, th, td {
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	font-size: 100%;
	vertical-align: baseline;
	background: transparent;
}

body {
	line-height: 1;
}

ol, ul {
	list-style: none;
}

blockquote, q {
	quotes: none;
}

blockquote:before, blockquote:after,

q:before, q:after {
	content: ”;
	content: none;
}

/* remember to define focus styles! */

:focus {
	outline: 0;
}

/* remember to highlight inserts somehow! */

ins {
	text-decoration: none;
}

del {
	text-decoration: line-through;
}

/* tables still need ‘cellspacing=”0″‘ in the markup */

table {
	border-collapse: collapse;
	border-spacing: 0;
}

5.YUI(CSS 재설정):

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
	margin: 0;
	padding: 0;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

fieldset,img {
	border: 0;
}

address,caption,cite,code,dfn,em,strong,th,var {
	font-style: normal;
	font-weight: normal;
}

ol,ul {
	list-style: none;
}

caption,th {
	text-align: left;
}

h1,h2,h3,h4,h5,h6 {
	font-size: 100%;
	font-weight: normal;
}

q:before,q:after {
	content: ”;
}

abbr,acronym {
	border: 0;
}

추천 튜토리얼: "CSS Tutorial"

위 내용은 CSS Rest(스타일 재설정) 권장사항의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
CSS 그리드는 무엇입니까?CSS 그리드는 무엇입니까?Apr 30, 2025 pm 03:21 PM

CSS 그리드는 복잡하고 반응이 좋은 웹 레이아웃을 만드는 강력한 도구입니다. 디자인을 단순화하고 접근성을 향상 시키며 이전 방법보다 더 많은 제어를 제공합니다.

CSS Flexbox 란 무엇입니까?CSS Flexbox 란 무엇입니까?Apr 30, 2025 pm 03:20 PM

기사는 반응 형 설계에서 공간의 효율적인 정렬 및 분포를위한 레이아웃 방법 인 CSS Flexbox에 대해 설명합니다. Flexbox 사용을 설명하고 CSS 그리드와 비교하고 브라우저 지원 세부 사항을 설명합니다.

CSS를 사용하여 웹 사이트를 반응하게 만드는 방법은 무엇입니까?CSS를 사용하여 웹 사이트를 반응하게 만드는 방법은 무엇입니까?Apr 30, 2025 pm 03:19 PM

이 기사는 Viewport Meta 태그, 유연한 그리드, 유체 미디어, 미디어 쿼리 및 상대 장치를 포함하여 CSS를 사용하여 반응 형 웹 사이트를 만드는 기술에 대해 설명합니다. 또한 CSS 그리드 및 Flexbox를 함께 사용하여 CSS 프레임 워크를 권장합니다.

CSS 박스 크기 부동산은 무엇을합니까?CSS 박스 크기 부동산은 무엇을합니까?Apr 30, 2025 pm 03:18 PM

이 기사는 요소 치수 계산 방법을 제어하는 ​​CSS 박스 크기 속성에 대해 설명합니다. Content-Box, Border-Box 및 Padding-Box와 같은 값과 레이아웃 설계 및 형태 정렬에 미치는 영향을 설명합니다.

CSS를 사용하여 어떻게 애니메이션 할 수 있습니까?CSS를 사용하여 어떻게 애니메이션 할 수 있습니까?Apr 30, 2025 pm 03:17 PM

기사는 CSS, 주요 특성 및 JavaScript와 결합 된 애니메이션 작성에 대해 논의합니다. 주요 문제는 브라우저 호환성입니다.

CSS를 사용하여 프로젝트에 3D 변환을 추가 할 수 있습니까?CSS를 사용하여 프로젝트에 3D 변환을 추가 할 수 있습니까?Apr 30, 2025 pm 03:16 PM

기사는 3D 변환, 주요 속성, 브라우저 호환성 및 웹 프로젝트에 대한 성능 고려 사항에 대한 CSS 사용에 대해 논의합니다. (문자 수 : 159)

CSS에 기울기를 추가 할 수있는 방법은 무엇입니까?CSS에 기울기를 추가 할 수있는 방법은 무엇입니까?Apr 30, 2025 pm 03:15 PM

이 기사는 CSS 그라디언트 (선형, 방사형, 반복)를 사용하여 웹 사이트 비주얼을 향상시키고 깊이, 초점 및 현대적인 미학을 추가합니다.

CSS의 의사 요소는 무엇입니까?CSS의 의사 요소는 무엇입니까?Apr 30, 2025 pm 03:14 PM

기사는 CSS의 의사 요소, HTML 스타일을 향상시키는 데 사용 및 의사 급의 차이점에 대해 설명합니다. 실제 사례를 제공합니다.

See all articles

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

Video Face Swap

Video Face Swap

완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

뜨거운 도구

DVWA

DVWA

DVWA(Damn Vulnerable Web App)는 매우 취약한 PHP/MySQL 웹 애플리케이션입니다. 주요 목표는 보안 전문가가 법적 환경에서 자신의 기술과 도구를 테스트하고, 웹 개발자가 웹 응용 프로그램 보안 프로세스를 더 잘 이해할 수 있도록 돕고, 교사/학생이 교실 환경 웹 응용 프로그램에서 가르치고 배울 수 있도록 돕는 것입니다. 보안. DVWA의 목표는 다양한 난이도의 간단하고 간단한 인터페이스를 통해 가장 일반적인 웹 취약점 중 일부를 연습하는 것입니다. 이 소프트웨어는

안전한 시험 브라우저

안전한 시험 브라우저

안전한 시험 브라우저는 온라인 시험을 안전하게 치르기 위한 보안 브라우저 환경입니다. 이 소프트웨어는 모든 컴퓨터를 안전한 워크스테이션으로 바꿔줍니다. 이는 모든 유틸리티에 대한 액세스를 제어하고 학생들이 승인되지 않은 리소스를 사용하는 것을 방지합니다.

SublimeText3 Linux 새 버전

SublimeText3 Linux 새 버전

SublimeText3 Linux 최신 버전

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

PhpStorm 맥 버전

PhpStorm 맥 버전

최신(2018.2.1) 전문 PHP 통합 개발 도구