×

注意!页面内容来自https://www.w3schools.com/cssref/css_colors.php,本站不储存任何内容,为了更好的阅读体验进行在线解析,若有广告出现,请及时反馈。若您觉得侵犯了您的利益,请通知我们进行删除,然后访问 原网页

<> #subtopnav { position:fixed; background-color: #282A35; color:#f1f1f1; padding:0; letter-spacing:1px; font-family: 'Source Sans Pro Topnav'sans-serif; font-size:0; top:56px; z-index:2; width:100%; white-space:nowrap; overflow:auto; scrollbar-width: none; max-width:1750px; margin:auto; left:0; right:0; } #subtopnav a{ display:inline-block; width:auto; margin:0!important; padding:5px 15px 5px 15px !important; font-size:15px!important; text-decoration: none; line-height: 1.5; } #subtopnav a:hover,#subtopnav a:focus,#subtopnav a:active{ background-color:#000000 !important; color:#ffffff !important; } #subtopnav a.active{ background-color: #04AA6D!important; color:#fff!important; } #btn_container_subtopnav { position:fixed; right:0; top:56px; font-size:0; xxborder-left:10px solid rgba(404253,0.5); } #btn_container_subtopnav a{ line-height:1.3!important; padding-top:7px!important; padding-bottom:6px!important; font-size:15px; background-color:#282A35; } #scroll_left_btn { cursor:pointer; display:none; position:fixed; left:0; top:56px; font-size: 15px; xborder-right: 10px solid rgba(404253,0.5); xbackground: red; } #scroll_left_btn span { xbackground-color:#282A35; background: linear-gradient(to right#282A35 70%transparent 100%); display:block; padding-top:5px; padding-bottom:5px; } #scroll_left_btn span:hover { background: linear-gradient(to right#000 95%transparent 100%); } #scroll_right_btn { cursor:pointer; float:left; font-size:15px; xxbackground-color:#282A35; background: linear-gradient(to left#282A35 70%transparent 100%); padding-top:5px; padding-bottom:5px; } #scroll_right_btn:hover { background: linear-gradient(to left#000 95%transparent 100%); } #menubtn_container { position:fixed; left:0; top:56px; xborder-right:10px solid rgba(404253,0.5); height:33px; color:white; font-size:15px; } #menubtn_container span { background-color:#282A35; } #darkmodemenu { position:fixed!important; right:0;!important; } #subtopnav::-webkit-scrollbar { display:none!important; } #google_translate_element a{ font-size:13px!important; line-height: normal; } #google_translate_element a:hover{ background-color:#fff!important; color:#000!important; } @media screen and (max-width: 992px){ #subtopnav a.subtopnav_firstitem { margin-left:50px!important; } } <> .topnavcontainer { background-color: #282A35; width:100%; max-width:1750px; left:0; right:0; margin:auto; height:33px; top:56px; position:fixed; z-index:3; } #scroll_left_btn { cursor: pointer; display: none; position: fixed; left: auto; top: auto; font-size: 15px; } #scroll_right_btn { cursor: pointer; position: fixed; font-size: 15px; display:none; } .topnavbackground { background-color:#282A35; position:fixed; width:100%; height:33px; top:56px; } body.darkpagetheme .topnavbackgroundbody.darkpagetheme .topnavcontainerbody.darkpagetheme #subtopnav { background-color:rgb(13,23,33)!important } body.darkpagetheme #scroll_right_btn { background: linear-gradient(to leftrgb(13,23,33) 70%transparent 100%) } body.darkpagetheme #scroll_left_btn span { background: linear-gradient(to rightrgb(13,23,33) 70%transparent 100%) }
<> .belowtopnavcontainer { max-width:1750px; margin:auto; } .contentcontainer { background-color: #f5f6f7; } body.darkpagetheme .contentcontainer { background-color: #29353e; } #leftmenuinner {width:230px;} @media (max-width:992px) { #leftmenuinner {width:260px;} #sidenav{width:260px;} }

CSS References

CSS Reference CSS Browser Support CSS Selectors CSS Combinators CSS Pseudo-classes CSS Pseudo-elements CSS At-rules CSS Functions CSS Reference Aural CSS Web Safe Fonts CSS Fallback Fonts CSS Animatable CSS Units CSS PX-EM Converter CSS Colors CSS Color Values CSS Default Values CSS Entities

CSS Properties

accent-color align-content align-items align-self all animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function aspect-ratio backdrop-filter backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-position-x background-position-y background-repeat background-size block-size border border-block border-block-color border-block-end border-block-end-color border-block-end- border-block-end-width border-block-start border-block-start-color border-block-start- border-block-start-width border-block- border-block-width border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom- border-bottom-width border-collapse border-color border-end-end-radius border-end-start-radius border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-inline border-inline-color border-inline-end border-inline-end-color border-inline-end- border-inline-end-width border-inline-start border-inline-start-color border-inline-start- border-inline-start-width border-inline- border-inline-width border-left border-left-color border-left- border-left-width border-radius border-right border-right-color border-right- border-right-width border-spacing border-start-end-radius border-start-start-radius border- border-top border-top-color border-top-left-radius border-top-right-radius border-top- border-top-width border-width bottom box-decoration-break box-reflect box-shadow box-sizing break-after break-before break-inside caption-side caret-color @charset clear clip clip-path color color-scheme column-count column-fill column-gap column-rule column-rule-color column-rule- column-rule-width column-span column-width columns @container content counter-increment counter-reset counter-set @counter- cursor direction display empty-cells filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font @font-face font-family font-feature-settings font-kerning @font-palette-values font-size font-size-adjust font-stretch font- font-variant font-variant-caps font-weight gap grid grid-area grid-auto-columns grid-auto-flow grid-auto-rows grid-column grid-column-end grid-column-start grid-row grid-row-end grid-row-start grid-template grid-template-areas grid-template-columns grid-template-rows hanging-punctuation height hyphens hyphenate-character image-rendering @import initial-letter inline-size inset inset-block inset-block-end inset-block-start inset-inline inset-inline-end inset-inline-start isolation justify-content justify-items justify-self @keyframes @layer left letter-spacing line-height list- list--image list--position list--type margin margin-block margin-block-end margin-block-start margin-bottom margin-inline margin-inline-end margin-inline-start margin-left margin-right margin-top marker marker-end marker-mid marker-start mask mask-clip mask-composite mask-image mask-mode mask-origin mask-position mask-repeat mask-size mask-type max-block-size max-height max-inline-size max-width @media min-block-size min-inline-size min-height min-width mix-blend-mode @namespace object-fit object-position offset offset-anchor offset-distance offset-path offset-position offset-rotate opacity order orphans outline outline-color outline-offset outline- outline-width overflow overflow-anchor overflow-wrap overflow-x overflow-y overscroll-behavior overscroll-behavior-block overscroll-behavior-inline overscroll-behavior-x overscroll-behavior-y padding padding-block padding-block-end padding-block-start padding-bottom padding-inline padding-inline-end padding-inline-start padding-left padding-right padding-top @page page-break-after page-break-before page-break-inside paint-order perspective perspective-origin place-content place-items place-self pointer-events position @property quotes resize right rotate row-gap scale @scope scroll-behavior scroll-margin scroll-margin-block scroll-margin-block-end scroll-margin-block-start scroll-margin-bottom scroll-margin-inline scroll-margin-inline-end scroll-margin-inline-start scroll-margin-left scroll-margin-right scroll-margin-top scroll-padding scroll-padding-block scroll-padding-block-end scroll-padding-block-start scroll-padding-bottom scroll-padding-inline scroll-padding-inline-end scroll-padding-inline-start scroll-padding-left scroll-padding-right scroll-padding-top scroll-snap-align scroll-snap-stop scroll-snap-type scrollbar-color shape-outside @starting- @supports tab-size table-layout text-align text-align-last text-decoration text-decoration-color text-decoration-line text-decoration- text-decoration-thickness text-emphasis text-emphasis-color text-emphasis-position text-emphasis- text-indent text-justify text-orientation text-overflow text-shadow text-transform text-underline-offset text-underline-position top transform transform-origin transform- transition transition-delay transition-duration transition-property transition-timing-function translate unicode-bidi user-select vertical-align visibility white-space widows width word-break word-spacing word-wrap writing-mode z-index zoom



CSS Colors


Color Names Supported by All Browsers

All modern browsers support the following 140 color names (click on a color nameor a hex valueto view the color as the background-color along with different text colors):

For a full overview of CSS colorsvisit our colors tutorial.

<> .colorbox{ padding:5px; } .innerbox{ padding-top:30px; font-size:120%; font-family:"xSegoe UI",Arial,sans-serif; font-weight:bold; } .colorhexspan { font-size:80%; opacity:0.6; } .linktocolormixerdiv { width:100%; margin-top:5px; font-size:80%; text-align:left; padding-left:5px; padding-bottom:5px; opacity:0.7; } .linktocolorpickerdiv { width:100%; margin-top:5px; font-size:80%; text-align:right; padding-right:5px; padding-bottom:5px; opacity:0.7; } .colorlinkcontainer { visibility:hidden; margin-top:9px; background-color:rgba(0,0,0,0.2); } #colornamestable a:link,#colornamestable a:hover,#colornamestable a:visited,#colornamestable a:active { text-decoration:none; color:inherit; opacity:0.8; } #colornamestable a:hover,#colornamestable a:active { opacity:1; } @media screen and (max-width:992px) { .colorlinkcontainer{ visibility:visible; } .colorlinkcontainer{ visibility:visible; } } .petter { visibility:visible; } .petter { visibility:visible; }

<> #wrappercontainer { width:100%; height:100px; background-color:red; position:relative; z-index:2; } #footerwrapper { background-color: #282A35; /* background-image:url('/images/background_in_space.webp'); background-repeat: repeat; background-position: right bottom;*/ } #spacemyfooter { padding:40px 80px 20px 80px; max-width:1500px; margin:auto; } .footerlinks_1 { width:auto; float:left; padding:40px 60px; color:#FFF4A3; font-family: Source Sans Prosans-serif; font-size:15px; } .footerlinks_1 .fa-logo { font-size:46px!important; color:#ddd; } .footerlinks_1:nth-child(1) { padding:30px 10px 30px 40px; } .footerlinks_1 a{ text-decoration:none; } .footerlinks_1 a:hover,.footerlinks_1 a:active{ text-decoration:underline; color:#FFF4A3; } .footerlinks_1 a:hover,.footerlinks_1 a:active{ text-decoration:underline; color:#FFF4A3!; } .footerlinks_1 a:hover i{ color:#FFF4A3!important; } .footerlinks_2 { width:auto; float:left; padding-left:90px; padding-right:135px; color:#ddd; font-family: Source Sans Prosans-serif; font-size:12px; line-height:15px; text-align:center; } .footerlinks_2:nth-child(4) { padding-right:0; } .footerlinks_2 h5 { margin-bottom:20px; } .footerlinks_2 a:visited,.footerlinks_2 a:link{ text-decoration:none; } .footerlinks_2 a:hover,.footerlinks_2 a:active{ color:#FFF4A3; } .footersome { padding:60px 40px 10px 40px; color:#ddd; font-size:20px; text-align:center; } .footersome a { margin-right:10px; } .footersome a:hover,.footersome a:active{ color:#FFF4A3; } .footersome .textlink { font-size:15px; text-decoration:none; } .footersome .textlink:active,.footersome .textlink:hover { text-decoration:underline; } .footertext { color:#ddd; font-size:12px; line-height:15px; text-align:center; } .footertext a:hover,.footertext a:active{ color:#FFF4A3; } @media screen and (max-width: 992px) { #wrappercontainer { z-index:0; } .footerlinks_1 { width:100%; margin:auto; float:none; text-align:center; padding:10px 20px!important; font-size:20px; } .footerlinks_1:nth-child(1) { padding:40px 20px; } .footerlinks_2 { width:100%; float:none; margin:auto; font-size:16px; line-height:20px; padding:0; } .footerlinks_2 h5 { font-size:26px; margin-top:40px; } .footertext { padding:0; } .footer-hide-special { display:none; } } /* @media screen and (max-width: 992px) { #footerwrapper { background-image:url('/images/background_in_space.webp'); background-color: #282A35; background-repeat: repeat; background-position: left top; } }*/
<> @media screen and (max-width: 1450px) { #spacemyfooter { max-width:1100px; } .footerlinks_1 { padding-left:30px; padding-right:30px; } .footerlinks_2 { padding-right:30px; } .footerlinks_2:nth-child(1) { padding-left:50px; } .footer-hide-special { display:none; } } @media screen and (max-width: 1100px) { #spacemyfooter { max-width:1000px; } .footerlinks_1 { padding-left:20px; padding-right:20px; } .footerlinks_2 { padding-right:20px; } .footerlinks_2:nth-child(1) { padding-left:20px; } }
<> /*Remove this after 20. April 2024*/ #err_message { padding:8px 16px 16px 40px; border-radius:5px; display:none; position:relative; background-color:#2D3748; color:#FFF4A3; font-family:'Source Sans Pro'sans-serif; } #err_message h2 { font-family:'Source Sans Pro'sans-serif; } #err_message p { color:#f1f1f1; } #err_message #close_err_message { position:absolute; right:0; top:0; font-size:20px; cursor:pointer; width:30px; height:30px; text-align:center; } #err_message #close_err_message:hover { background-color:#FFF4A3; color:#2D3748; border-radius:50% }
×

Contact Sales

If you want to use W3Schools services as an educational institutionteam or enterprisesend us an e-mail:
[email protected]

Report Error

If you want to report an erroror if you want to make a suggestionsend us an e-mail:
[email protected]

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorialsreferencesand examples are constantly reviewed to avoid errorsbut we cannot warrant full correctness of all content. While using W3Schoolsyou agree to have read and accepted our terms of use cookies and privacy policy.

Copyright 1999-2025 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.