Hướng dẫn css wiki - wiki css
Ngày đăng:
23/11/2022
Trả lời:
0
Lượt xem:
7
/* CSS dùng chung cho các skin */ /* Bắt buộc định dạng khối để tránh vụ blockquote tràn dưới phần tử trôi */ blockquote { overflow: hidden; margin: 1em 0; padding: 0 40px; } /* Giảm nhảy trang bằng cách ẩn nội dung bị thu gọn/loại bỏ */ .client-js .mw-special-Watchlist #watchlist-message, .client-js .NavFrame.collapsed .NavContent, .client-js .collapsible:not( .mw-made-collapsible).collapsed > tbody > tr:not(:first-child) { display: none; } /* Kiểu cách cho thông báo */ #bodyContent .letterhead { background-image:url('//upload.wikimedia.org/wikipedia/commons/e/e0/Tan-page-corner.png'); background-size: 80px auto; background-repeat:no-repeat; padding: 2em; background-color: #faf9f2; } /* Kiểu chữ bình thường cho các đầu hàng bảng có thuộc tính scope="row" */ .wikitable.plainrowheaders th[scope=row] { font-weight: normal; /* @noflip */ text-align: left; } /* Các danh sách trong ô dữ liệu luôn được căn bên trái */ .wikitable td ul, .wikitable td ol, .wikitable td dl { /* @noflip */ text-align: left; } /* …trừ khi cũng có lớp hlist */ .toc.hlist ul, #toc.hlist ul, .wikitable.hlist td ul, .wikitable.hlist td ol, .wikitable.hlist td dl { text-align: inherit; } /* Kiểu cho các bản mẫu hộp thông tin */ .infobox { border: 1px solid #aaa; border-spacing: 5px; background-color: #f9f9f9; margin: 5px 0 5px 10px; color: black; float: right; clear: right; text-align: left; font-size: 0.88em; line-height: 1.25em; word-wrap: break-word; } .infobox caption { font-size: 125%; font-weight: bold; padding: 0.2em; text-align: center; } .infobox th { vertical-align: super; text-align: left; } .infobox th[scope="row"] { max-width: 140px; word-wrap: normal; } .infobox th[scope=col].double { text-align: left; } .infobox th[scope=row] { text-align: left; vertical-align: top; padding-right: 0.8em; /* width: 30%; */ width: 8em; } .infobox th[scope=row], .infobox td { vertical-align: top; } .infobox th[scope=row].middle { vertical-align: middle; } .infobox.bordered { border-collapse: collapse; } .infobox.bordered td, .infobox.bordered th { border: 1px solid #aaa; } .infobox.bordered .borderless td, .infobox.bordered .borderless th { border: 0; } .infobox td.data { text-align: center; } .infobox.sisterproject { width: 20em; font-size: 90%; } .infobox.standard-talk { border: 1px solid #c0c090; background-color: #f8eaba; } .infobox.standard-talk.bordered td, .infobox.standard-talk.bordered th { border: 1px solid #c0c090; } /* Kiểu cho các infobox có cột bên trái rộng hơn */ .infobox.widerleft th[scope=row] { width: 15em; } /* Kiểu cho hộp phân loại */ .infobox.taxobox th[scope=row] { width: 10em; } /* Kiểu cho infobox road */ .infobox.road th[scope=row] { width: 5em; } /* Kiểu cho infobox có bản đồ đường sắt */ .infobox.railway { background: #F9F9F9; border: 1px solid #AAA; clear: right; float: right; line-height: 1.4em; font-size: 0.9em; max-width: 750px; margin: 0 0 0.5em 1em; word-wrap: break-word; } .infobox.railway th[scope=row], .infobox.railway td { padding-top: 0; vertical-align: top; } /* Kiểu cho các infobox anime và manga */ .infobox.manga { border-spacing: 2px; padding: 2px; min-width: 0; line-height: 1.35em; } /* Kiểu cho các infobox có viền và các hàng được nhập với nhau */ .infobox.bordered .mergedtoprow td, .infobox.bordered .mergedtoprow th { border: 0; border-top: 1px solid #aaa; /* @noflip */ border-right: 1px solid #aaa; } .infobox.bordered .mergedrow td, .infobox.bordered .mergedrow th { border: 0; /* @noflip */ border-right: 1px solid #aaa; } /* Kiểu cho các infobox địa lý, v.d. quốc gia, các đơn vị hành chính. */ .infobox.geography { border-collapse: collapse; line-height: 1.2em; font-size: 90%; } .infobox.geography td, .infobox.geography th { border-top: 1px solid #aaa; padding: 0.6em 0.8em 0.6em 0.8em; } .infobox.geography .mergedtoprow td, .infobox.geography .mergedtoprow th { border-top: 1px solid #aaa; padding: 0.6em 0.8em 0.4em 0.8em; } .infobox.geography .mergedrow td, .infobox.geography .mergedrow th { border: 0; padding: 0.2em 0.8em 0.4em 0.8em; } .infobox.geography .mergedbottomrow td, .infobox.geography .mergedbottomrow th { border-top: 0; border-bottom: 1px solid #aaa; padding: 0.2em 0.8em 0.6em 0.8em; } .infobox.geography .maptable td, .infobox.geography .maptable th { border: 0; padding: 0; } /* Kiểu cho infobox airlines */ .infobox.airlines { min-width: 314px; max-width: 320px; } /* Reset top margin for lists embedded in columns */ div.columns { margin-top: 0.3em; } div.columns dl, div.columns ol, div.columns ul { margin-top: 0; } /* Avoid elements from breaking between columns */ .nocolbreak, div.columns li, div.columns dd dd { -webkit-column-break-inside: avoid; page-break-inside: avoid; break-inside: avoid-column; } /* Style for [[Template:Flowlist]] that Lets lists flow around floating objecs */ .flowlist ul { overflow-x: hidden; margin-left: 0; padding-left: 1.6em; } .flowlist ol { overflow-x: hidden; margin-left: 0; padding-left: 3.2em; } .flowlist dl { overflow-x: hidden; } /** * Style for horizontal lists (separator following item). * IE8-specific classes are assigned in [[MediaWiki:Common.js/IEFixes.js]]. * @source mediawiki.org/wiki/Snippets/Horizontal_lists * @revision 6 (2014-05-09) * @author [[:en:User:Edokter]] */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { margin: 0; display: inline; } /* Display nested lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Generate interpuncts */ .hlist dt:after { content: ": "; } .hlist dd:after, .hlist li:after { content: " · "; content: "\00A0· "; font-weight: bold; } .hlist dd:last-child:after, .hlist dt:last-child:after, .hlist li:last-child:after { content: none; } /* For IE8 */ .hlist dd.hlist-last-child:after, .hlist dt.hlist-last-child:after, .hlist li.hlist-last-child:after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child:before, .hlist dd dt:first-child:before, .hlist dd li:first-child:before, .hlist dt dd:first-child:before, .hlist dt dt:first-child:before, .hlist dt li:first-child:before, .hlist li dd:first-child:before, .hlist li dt:first-child:before, .hlist li li:first-child:before { content: " ("; font-weight: normal; } .hlist dd dd:last-child:after, .hlist dd dt:last-child:after, .hlist dd li:last-child:after, .hlist dt dd:last-child:after, .hlist dt dt:last-child:after, .hlist dt li:last-child:after, .hlist li dd:last-child:after, .hlist li dt:last-child:after, .hlist li li:last-child:after { content: ") "; font-weight: normal; } /* For IE8 */ .hlist dd dd.hlist-last-child:after, .hlist dd dt.hlist-last-child:after, .hlist dd li.hlist-last-child:after, .hlist dt dd.hlist-last-child:after, .hlist dt dt.hlist-last-child:after, .hlist dt li.hlist-last-child:after, .hlist li dd.hlist-last-child:after, .hlist li dt.hlist-last-child:after, .hlist li li.hlist-last-child:after { content: ") "; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li:before { content: " " counter(listitem) " "; white-space: nowrap; } .hlist dd ol > li:first-child:before, .hlist dt ol > li:first-child:before, .hlist li ol > li:first-child:before { content: " (" counter(listitem) " "; } /* Unbulleted lists */ .plainlist ol, .plainlist ul { line-height: inherit; list-style: none none; margin: 0; } .plainlist ol li, .plainlist ul li { margin-bottom: 0; } /* Default style for navigation boxes */ .navbox { /* Navbox container style */ box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; clear: both; font-size: 88%; text-align: center; padding: 1px; margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */ } .navbox .navbox { margin-top: 0; /* No top margin for nested navboxes */ } .navbox + .navbox { margin-top: -1px; /* Single pixel border between adjacent navboxes */ } .navbox-inner, .navbox-subgroup { width: 100%; } .navbox-group, .navbox-title, .navbox-abovebelow { padding: 0.25em 1em; /* Title, group and above/below styles */ line-height: 1.5em; text-align: center; } th.navbox-group { /* Group style */ white-space: nowrap; /* @noflip */ text-align: right; } .navbox, .navbox-subgroup { background-color: #fdfdfd; /* Background color */ } .navbox-list { line-height: 1.5em; border-color: #fdfdfd; /* Must match background color */ } /* cell spacing for navbox cells */ tr + tr > .navbox-abovebelow, tr + tr > .navbox-group, tr + tr > .navbox-image, tr + tr > .navbox-list { /* Borders above 2nd, 3rd, etc. rows */ border-top: 2px solid #fdfdfd; /* Must match background color */ } .navbox th, .navbox-title { background-color: #ccccff; /* Level 1 color */ } .navbox-abovebelow, th.navbox-group, .navbox-subgroup .navbox-title { background-color: #ddddff; /* Level 2 color */ } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background-color: #e6e6ff; /* Level 3 color */ } .navbox-even { background-color: #f7f7f7; /* Even row striping */ } .navbox-odd { background-color: transparent; /* Odd row striping */ } .navbox .hlist td dl, .navbox .hlist td ol, .navbox .hlist td ul, .navbox td.hlist dl, .navbox td.hlist ol, .navbox td.hlist ul { padding: 0.125em 0; /* Adjust hlist padding in navboxes */ } /* Default styling for Navbar template */ .navbar { display: inline; font-size: 88%; font-weight: normal; } .navbar ul { display: inline-block; white-space: nowrap; } .mw-body-content .navbar ul { line-height: inherit; } .navbar li { word-spacing: -0.125em; } .navbar.mini li abbr[title] { font-variant: small-caps; border-bottom: none; text-decoration: none; cursor: inherit; } /* Navbar styling when nested in infobox and navbox */ .infobox .navbar { font-size: 100%; } .navbox .navbar { display: block; font-size: 100%; } .navbox-title .navbar { /* @noflip */ float: left; /* @noflip */ text-align: left; /* @noflip */ margin-right: 0.5em; } /* Styling for JQuery makeCollapsible, matching that of collapseButton */ .mw-parser-output .mw-collapsible-toggle { font-weight: normal; /* @noflip */ text-align: right; padding-right: 0.2em; padding-left: 0.2em; } .mw-collapsible-leftside-toggle .mw-collapsible-toggle { /* @noflip */ float: left; /* @noflip */ text-align: left; } /* Bảng điều khiển chuẩn, lấy từ .de, để dấu các thông tin trong hộp Chi tiết tại [[:en:Wikipedia:NavFrame]]. */ div.NavFrame { margin: 0; padding: 4px; border: 1px solid #a2a9b1; text-align: center; border-collapse: collapse; font-size: 95%; } div.NavFrame + div.NavFrame { border-top-style: none; border-top-style: hidden; } div.NavFrame div.NavHead { line-height: 1.6em; font-weight: bold; background-color: #ccf; position: relative; } div.NavFrame p, div.NavFrame div.NavContent, div.NavFrame div.NavContent p { font-size: 100%; } a.NavToggle { position: absolute; top: 0; /* @noflip */ right: 3px; font-weight: normal; font-size: 90%; } /* Kiểu cách cho lớp hatnote */ .hatnote { font-style: italic; } .hatnote i { font-style: normal; } div.hatnote { /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; } div.hatnote + div.hatnote { margin-top: -0.5em; } /* Cho phép nhúng trang để hiện danh sách thay vì bảng. */ .listify td { display: list-item; } .listify tr { display: block; } .listify table { display: block; } /* Kiểu cách cho các "hộp thông báo" */ .notice { clear: both; text-align: justify; margin: 1em 0.5em; padding: 0.5em; } .meta-notice { border-top: 3px double #cccccc; border-bottom: 3px double #cccccc; } .meta-notice-icon { background: url('/favicon.ico') center left no-repeat; padding-left: 24px; } #disambig { background: url('//upload.wikimedia.org/wikipedia/commons/thumb/7/72/Disambig.svg/32px-Disambig.svg.png') center left no-repeat; background-size: 32px auto; padding-left: 40px; } #stub, #substub, #dich { background: url('//upload.wikimedia.org/wikipedia/commons/thumb/f/f4/Baustelle.svg/32px-Baustelle.svg.png') center left no-repeat; background-size: 32px auto; padding-left: 40px; } /* #spoiler { border-top: 2px solid #ddd; border-bottom:2px solid #ddd; } */ /* Đoạn âm thanh có cách phát âm */ .audiolink a { background: url("//upload.wikimedia.org/wikipedia/commons/thumb/2/21/Speaker_Icon.svg/13px-Speaker_Icon.svg.png") center left no-repeat !important; background-size: 13px auto !important; padding-left: 16px !important; padding-right: 0 !important; } .k-player .k-options { letter-spacing: -0.05em; text-transform: none; white-space: nowrap; } /* Kiểu cách chuẩn cho các bản mẫu ở trang thảo luận */ .Talk-Notice { border: 1px solid #C0C090; background-color: #F8EABA; margin-bottom: 3px; width: 85%; border-spacing: 3px; margin-left: auto; margin-right: auto; } /* Viết các trang đổi hướng bằng chữ xiên ở [[Đặc biệt:Allpages]] |