CSS Reset は、デフォルトのスタイルをリセットすることを意味します。 HTML のほとんどのタグ要素は、Web ページ表示時にデフォルトの属性値を持っていますが、通常、要素のスタイルを繰り返し定義することを避けるために、デフォルトのスタイルをリセットする (CSS リセット) 必要があります。いくつかの例を示します:
1. タオバオ (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. 百度 (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 を超えて」 (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; }
推奨チュートリアル :《CSSTutorial》
以上がCSS Rest (リセットスタイル) の推奨事項の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

CSSグリッドは、複雑で応答性の高いWebレイアウトを作成するための強力なツールです。設計を簡素化し、アクセシビリティを向上させ、古い方法よりも多くの制御を提供します。

記事では、レスポンシブデザインにおけるスペースの効率的なアラインメントと分布のためのレイアウト方法であるCSS FlexBoxについて説明します。 FlexBoxの使用量を説明し、CSSグリッドと比較し、ブラウザのサポートを詳細に説明します。

この記事では、ビューポートメタタグ、柔軟なグリッド、流体メディア、メディアクエリ、相対ユニットなど、CSSを使用してレスポンシブWebサイトを作成するための手法について説明します。また、CSSグリッドとフレックスボックスを使用してカバーし、CSSフレームワークを推奨しています

この記事では、要素の寸法の計算方法を制御するCSSボックスサイズのプロパティについて説明します。コンテンツボックス、ボーダーボックス、パディングボックスなどの値と、レイアウト設計とフォームアライメントへの影響について説明します。

記事では、CSS、キープロパティ、およびJavaScriptとの組み合わせを使用してアニメーションの作成について説明します。主な問題は、ブラウザの互換性です。

記事では、3D変換、主要なプロパティ、ブラウザの互換性、およびWebプロジェクトのパフォーマンスに関する考慮事項にCSSを使用して説明します。

この記事では、CSSグラデーション(線形、放射状、繰り返し)を使用して、ウェブサイトのビジュアルを強化し、深さ、フォーカス、および現代の美学を追加します。

記事では、CSSの擬似要素、HTMLスタイリングの強化における使用、および擬似クラスとの違いについて説明します。実用的な例を提供します。


ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

Video Face Swap
完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

人気の記事

ホットツール

MinGW - Minimalist GNU for Windows
このプロジェクトは osdn.net/projects/mingw に移行中です。引き続きそこでフォローしていただけます。 MinGW: GNU Compiler Collection (GCC) のネイティブ Windows ポートであり、ネイティブ Windows アプリケーションを構築するための自由に配布可能なインポート ライブラリとヘッダー ファイルであり、C99 機能をサポートする MSVC ランタイムの拡張機能が含まれています。すべての MinGW ソフトウェアは 64 ビット Windows プラットフォームで実行できます。

EditPlus 中国語クラック版
サイズが小さく、構文の強調表示、コード プロンプト機能はサポートされていません

AtomエディタMac版ダウンロード
最も人気のあるオープンソースエディター

メモ帳++7.3.1
使いやすく無料のコードエディター

SublimeText3 英語版
推奨: Win バージョン、コードプロンプトをサポート!

ホットトピック









