{"id":55,"date":"2009-07-17T12:13:24","date_gmt":"2009-07-17T04:13:24","guid":{"rendered":""},"modified":"2022-10-16T11:33:00","modified_gmt":"2022-10-16T03:33:00","slug":"%e5%b8%b8%e7%94%a8%e7%9a%84css%e5%91%bd%e5%90%8d%e8%a7%84%e5%88%99","status":"publish","type":"post","link":"https:\/\/www.soulbox.cn\/?p=55","title":{"rendered":"\u5e38\u7528\u7684CSS\u547d\u540d\u89c4\u5219"},"content":{"rendered":"<p>\u5934\uff1aheader<br \/>\u5185\u5bb9\uff1acontent\/container<br \/>\u5c3e\uff1afooter<br \/>\u5bfc\u822a\uff1anav<br \/>\u4fa7\u680f\uff1asidebar<br \/>\u680f\u76ee\uff1acolumn<br \/>\u9875\u9762\u5916\u56f4\u63a7\u5236\u6574\u4f53\u5e03\u5c40\u5bbd\u5ea6\uff1awrapper<br \/>\u5de6\u53f3\u4e2d\uff1aleft right center<br \/>\u767b\u5f55\u6761\uff1aloginbar<br \/>\u6807\u5fd7\uff1alogo<br \/>\u5e7f\u544a\uff1abanner<br \/>\u9875\u9762\u4e3b\u4f53\uff1amain<br \/>\u70ed\u70b9\uff1ahot<br \/>\u65b0\u95fb\uff1anews<br \/>\u4e0b\u8f7d\uff1adownload<br \/>\u5b50\u5bfc\u822a\uff1asubnav<br \/>\u83dc\u5355\uff1amenu<br \/>\u5b50\u83dc\u5355\uff1asubmenu<br \/>\u641c\u7d22\uff1asearch<br \/>\u53cb\u60c5\u94fe\u63a5\uff1afriendlink<br \/>\u9875\u811a\uff1afooter<br \/>\u7248\u6743\uff1acopyright<br \/>\u6eda\u52a8\uff1ascroll<br \/>\u5185\u5bb9\uff1acontent<br \/>\u6807\u7b7e\u9875\uff1atab<br \/>\u6587\u7ae0\u5217\u8868\uff1alist<br \/>\u63d0\u793a\u4fe1\u606f\uff1amsg<br \/>\u5c0f\u6280\u5de7\uff1atips<br \/>\u680f\u76ee\u6807\u9898\uff1atitle<br \/>\u52a0\u5165\uff1ajoinus<br \/>\u6307\u5357\uff1aguild<br \/>\u670d\u52a1\uff1aservice<br \/>\u6ce8\u518c\uff1aregsiter<br \/>\u72b6\u6001\uff1astatus<br \/>\u6295\u7968\uff1avote<br \/>\u5408\u4f5c\u4f19\u4f34\uff1apartner<\/p>\n<p>\u3000\u3000<br \/>\u6ce8\u91ca\u7684\u5199\u6cd5<\/p>\n<p>CSS\u6ce8\u91ca<br \/>\u3000\u3000\/* Footer *\/<br \/>\u3000\u3000\u5185\u5bb9\u533a<br \/>\/* End Footer *\/<\/p>\n<p>  Html\u6ce8\u91ca<br \/>  &lt;!&#8211;footer&#8211;&gt;<br \/>  &lt;!&#8211;end footer&#8211;&gt;<\/p>\n<p>id\u7684\u547d\u540d<\/p>\n<p>(1)  \u9875\u9762\u7ed3\u6784<\/p>\n<p>\u3000\u3000\u5bb9\u5668: container<br \/>\u3000\u3000\u9875\u5934\uff1aheader<br \/>\u3000\u3000\u5185\u5bb9\uff1acontent\/container<br \/>\u3000\u3000\u9875\u9762\u4e3b\u4f53\uff1amain<br \/>\u3000\u3000\u9875\u5c3e\uff1afooter<br \/>\u3000\u3000\u5bfc\u822a\uff1anav<br \/>\u3000\u3000\u4fa7\u680f\uff1asidebar<br \/>\u3000\u3000\u680f\u76ee\uff1acolumn<br \/>\u3000\u3000\u9875\u9762\u5916\u56f4\u63a7\u5236\u6574\u4f53\u5e03\u5c40\u5bbd\u5ea6\uff1awrapper<br \/>\u5de6\u53f3\u4e2d\uff1aleft right center<\/p>\n<p>\u3000\u3000(2)\u5bfc\u822a<\/p>\n<p>\u3000\u3000\u5bfc\u822a\uff1anav<br \/>\u3000\u3000\u4e3b\u5bfc\u822a\uff1amainbav<br \/>\u3000\u3000\u5b50\u5bfc\u822a\uff1asubnav<br \/>\u3000\u3000\u9876\u5bfc\u822a\uff1atopnav<br \/>\u3000\u3000\u8fb9\u5bfc\u822a\uff1asidebar<br \/>\u3000\u3000\u5de6\u5bfc\u822a\uff1aleftsidebar<br \/>\u3000\u3000\u53f3\u5bfc\u822a\uff1arightsidebar<br \/>\u3000\u3000\u83dc\u5355\uff1amenu<br \/>\u3000\u3000\u5b50\u83dc\u5355\uff1asubmenu<br \/>\u3000\u3000\u6807\u9898: title<br \/>\u6458\u8981: summary<\/p>\n<p>\u3000\u3000(3)\u529f\u80fd<\/p>\n<p>\u3000\u3000\u6807\u5fd7\uff1alogo<br \/>\u3000\u3000\u5e7f\u544a\uff1abanner<br \/>\u3000\u3000\u767b\u9646\uff1alogin<br \/>\u3000\u3000\u767b\u5f55\u6761\uff1aloginbar<br \/>\u3000\u3000\u6ce8\u518c\uff1aregsiter<br \/>\u3000\u3000\u641c\u7d22\uff1asearch<br \/>\u3000\u3000\u529f\u80fd\u533a\uff1ashop<br \/>\u3000\u3000\u6807\u9898\uff1atitle<br \/>\u3000\u3000\u52a0\u5165\uff1ajoinus<br \/>\u3000\u3000\u72b6\u6001\uff1astatus<br \/>\u3000\u3000\u6309\u94ae\uff1abtn<br \/>\u3000\u3000\u6eda\u52a8\uff1ascroll<br \/>\u3000\u3000\u6807\u7b7e\u9875\uff1atab<br \/>\u3000\u3000\u6587\u7ae0\u5217\u8868\uff1alist<br \/>\u3000\u3000\u63d0\u793a\u4fe1\u606f\uff1amsg<br \/>\u3000\u3000\u5f53\u524d\u7684: current<br \/>\u3000\u3000\u5c0f\u6280\u5de7\uff1atips<br \/>\u3000\u3000\u56fe\u6807: icon<br \/>\u3000\u3000\u6ce8\u91ca\uff1anote<br \/>\u3000\u3000\u6307\u5357\uff1aguild<br \/>\u3000\u3000\u670d\u52a1\uff1aservice<br \/>\u3000\u3000\u70ed\u70b9\uff1ahot<br \/>\u65b0\u95fb\uff1anews<br \/>\u62db\u8058\uff1ahr<br \/>\u3000\u3000\u4e0b\u8f7d\uff1adownload<br \/>\u3000\u3000\u6295\u7968\uff1avote<br \/>\u3000\u3000\u5408\u4f5c\u4f19\u4f34\uff1apartner<br \/>\u3000\u3000\u53cb\u60c5\u94fe\u63a5\uff1alink<br \/>\u3000\u3000\u7248\u6743\uff1acopyright<\/p>\n<p>class\u7684\u547d\u540d<\/p>\n<p>(1)  \u989c\u8272:\u4f7f\u7528\u989c\u8272\u7684\u540d\u79f0\u6216\u800516\u8fdb\u5236\u4ee3\u7801,\u5982<\/p>\n<p>\u3000\u3000.red { color: red; }<br \/>\u3000\u3000.f60 { color: #f60; }<br \/>\u3000\u3000.ff8600 { color: #ff8600; }<\/p>\n<p>\u3000\u3000(2)\u5b57\u4f53\u5927\u5c0f,\u76f4\u63a5\u4f7f\u7528&quot;font+\u5b57\u4f53\u5927\u5c0f&quot;\u4f5c\u4e3a\u540d\u79f0,\u5982<\/p>\n<p>\u3000\u3000.font12px { font-size: 12px; }<br \/>.font9pt {font-size: 9pt; }<\/p>\n<p>\u3000\u3000(3)\u5bf9\u9f50\u6837\u5f0f,\u4f7f\u7528\u5bf9\u9f50\u76ee\u6807\u7684\u82f1\u6587\u540d\u79f0,\u5982<\/p>\n<p>\u3000\u3000.left { float:left; }<br \/>\u3000\u3000.bottom { float:bottom; }<\/p>\n<p>\u3000\u3000(4)\u6807\u9898\u680f\u6837\u5f0f,\u4f7f\u7528&quot;\u7c7b\u522b+\u529f\u80fd&quot;\u7684\u65b9\u5f0f\u547d\u540d,\u5982<br \/>\u3000\u3000.barnews { }<br \/>\u3000\u3000.barproduct { }<\/p>\n<p>  (5)\u5173\u4e8eCSS\u5e38\u7528\u7b80\u5199<\/p>\n<p>  Body,img,form,ul,li,dd,dt,h1,h2,h3,h4{ margin:0; padding:0; border:0; font-size:12px; list-style:none;}<\/p>\n<p>  .font12blue a:link,.font12blue a:visited{ color:blue; text-decoration:none;}<br \/>  .font12blue a:hover{ color:#ff6600; text-decoration:underline;}<\/p>\n<p>  Margin:5px 0 0 0\/*\u4e0a \u53f3 \u4e0b \u5de6*\/<br \/>  Padding:5px 0 0 0\/*\u4e0a \u53f3 \u4e0b \u5de6*\/<br \/>  Border:1px solid #000<\/p>\n<p>(5)\u5176\u4ed6<br \/>Mozilla\u5efa\u8bae\u7684CSS\u4e66\u5199\u987a\u5e8f<br \/>\/\/\u663e\u793a\u5c5e\u6027 display list-style position float clear \/\/\u81ea\u8eab\u5c5e\u6027 width height margin padding border background \/\/\u6587\u672c\u5c5e\u6027 color font text-decoration text-align vertical-align white-space other text content<\/p>\n<p>\u5173\u4e8ehack<br \/>width:100px;\/*FF Hack*\/<br \/>*+width:200px;\/*ie7 Hack*\/<br \/>_width:150px;\/*ie6 Hack*\/<br \/>\u53ef\u4ee5\u89e3\u51b3FF\u4e0eIE7\uff0cIE6\u7684\u517c\u5bb9\u95ee\u9898\uff0c\u4e66\u5199\u987a\u5e8f\u4e3aFF,IE7,IE6<br \/>(HTML\u4ee3\u7801\uff0cCSS\u6837\u5f0f\u8d8a\u7b80\u7ec3\u8d8a\u597d\uff0c\u5c3d\u91cf\u4e0d\u8981\u7528HACK)<\/p>\n<p>\u6ce8\u610f\u4e8b\u9879<\/p>\n<p>\u3000\u30001.\u4e00\u5f8b\u5c0f\u5199;<br \/>\u3000\u30002.\u5c3d\u91cf\u7528\u82f1\u6587;<br \/>\u3000\u30003.\u5355\u8bcd\u4e0e\u5355\u8bcd\u4e2d\u95f4\u7528\u4e0b\u5212\u7ebf\u9694\u5f00;<br \/>4.\u5c3d\u91cf\u4e0d\u7f29\u5199\uff0c\u9664\u975e\u4e00\u770b\u5c31\u660e\u767d\u7684\u5355\u8bcd.<br \/>5.\u5b9a\u4e49\u65f6\u6700\u5916\u9762\u7684\u90a3\u4e2aDIV\u7528. Wrapper{}\u6765\u5b9a\u4e49<\/p>\n<p>CSS\u6837\u5f0f\u6587\u4ef6\u547d\u540d\uff08\u5b8c\u5584\u4e2d\uff09<\/p>\n<p>\u3000\u3000\u4e3b\u8981\u7684 master.css<br \/>\u3000\u3000\u6a21\u5757 module.css<br \/>\u3000\u3000\u57fa\u672c\u5171\u7528 base.css<br \/>\u3000\u3000\u5e03\u5c40\uff0c\u7248\u9762 layout.css<br \/>\u3000\u3000\u4e3b\u9898 themes.css<br \/>\u3000\u3000\u4e13\u680f columns.css<br \/>\u3000\u3000\u6587\u5b57 font.css<br \/>\u3000\u3000\u8868\u5355 forms.css<br \/>\u6253\u5370 print.css<br \/>\u57fa\u672c\u5171\u7528\uff1a base.css (\u516c\u7528\u6837\u5f0f,\u6587\u5b57,\u8fde\u63a5\uff0c\u8868\u5355\uff0c\u8fb9\u6846)<br \/>\u5934\u5c3e\u5171\u7528\u5e03\u5c40\uff1aheader (\u516c\u7528\u7684\u5934\u6587\u4ef6\uff0c\u5e95\u6587\u4ef6\uff0c\u641c\u7d22\u7b49\u6709\u4e30\u5e03\u5c40\u7684\u6837\u5f0f)<br \/>\u5e03\u5c40\uff0c\u7248\u9762\uff1a layout.css \uff08\u6240\u6709\u5355\u72ec\u5e03\u5c40\u4e0e\u7248\u9762\u7684\u6837\u5f0f\uff09<br \/>\u8865\u4e01 mend.css \uff08\u540e\u671f\u8865\u5145\u6269\u5c55\u7684\u6837\u5f0f\uff09<br \/>\u8d44\u8baf\uff1aarticle1.css (\u8d44\u8baf\u7684channel.asp \u3001list.asp\u3001detail.asp\u7684\u6837\u5f0f\u6587\u4ef6)<br \/>\u4f01\u4e1a\uff1aarticle1.css (\u4f01\u4e1a\u7684channel.asp \u3001list.asp\u3001detail.asp\u7684\u6837\u5f0f\u6587\u4ef6)<br \/>\u77e5\u8bc6\uff1aarticle1.css (\u77e5\u8bc6\u7684channel.asp \u3001list.asp\u3001detail.asp\u7684\u6837\u5f0f\u6587\u4ef6)<br \/>\u4ea7\u54c1\uff1aproduct.css (\u4ea7\u54c1\u7684channel.asp \u3001list.asp\u3001detail.asp\u7684\u6837\u5f0f\u6587\u4ef6)<br \/>\u5546\u673a\uff1ainformation.css (\u5546\u673a\u7684channel.asp \u3001list.asp\u3001detail.asp\u7684\u6837\u5f0f\u6587\u4ef6)<br \/>\u5c55\u4f1a\uff1aexhibit.css (\u5c55\u4f1a\u7684channel.asp \u3001list.asp\u3001detail.asp\u7684\u6837\u5f0f\u6587\u4ef6)<br \/>\u4eba\u624d\uff1ajob.css (\u4eba\u624d\u7684channel.asp \u3001list.asp\u3001detail.asp\u7684\u6837\u5f0f\u6587\u4ef6)<br \/>\u5e97\u8f85\uff1acorporation.css (\u5e97\u8f85\u7684channel.asp \u3001list.asp\u3001detail.asp\u7684\u6837\u5f0f\u6587\u4ef6)<br \/>\u4f1a\u5458\uff1amember.css (\u4f1a\u5458\u7684channel.asp \u3001list.asp\u3001detail.asp\u7684\u6837\u5f0f\u6587\u4ef6)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5934\uff1aheader\u5185\u5bb9\uff1aconte&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[6],"class_list":["post-55","post","type-post","status-publish","format-standard","hentry","category-web","tag-web"],"_links":{"self":[{"href":"https:\/\/www.soulbox.cn\/index.php?rest_route=\/wp\/v2\/posts\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.soulbox.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.soulbox.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.soulbox.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.soulbox.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=55"}],"version-history":[{"count":1,"href":"https:\/\/www.soulbox.cn\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions"}],"predecessor-version":[{"id":797,"href":"https:\/\/www.soulbox.cn\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions\/797"}],"wp:attachment":[{"href":"https:\/\/www.soulbox.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.soulbox.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.soulbox.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}