zoukankan      html  css  js  c++  java
  • html几个比较常用的颜色名称

    html几个比较常用的颜色名称

    顺便贴一下代码

    <!doctype html>
    <html>
     <head>
      <meta charset="UTF-8"/>
      <title>常用颜色值</title>
      <style>
        h2{text-align:center;width:720px;}
        ul{list-style:none;float:left;width:720px;}
        li{width:118px;height:40px;border:1px solid #ddd;float:left;text-align:center;line-height:40px;}
    
        li:first-child{background-color:red;}
        li:nth-child(2){background-color:green}
        li:nth-child(3){background-color:blue;}
        li:nth-child(4){background-color:yellow;}
        li:nth-child(5){background-color:black;}
        li:nth-child(6){background-color:gray;}
    
        li:nth-child(7){background-color:white;}
        li:nth-child(8){background-color:orange;}
        li:nth-child(9){background-color:pink;}
        li:nth-child(10){background-color:purple;}
        li:nth-child(11){background-color:gray;}
        li:nth-child(12){background-color:lightgreen;}
    
        li:nth-child(13){background-color:lightblue;}
        li:nth-child(14){background-color:#eee;}
        li:nth-child(15){background-color:#ddd;}
        li:nth-child(16){background-color:#ccc;}
        li:nth-child(17){background-color:#bbb;}
        li:nth-child(18){background-color:#aaa;}
        li:nth-child(19){background-color:#999;}
        li:nth-child(20){background-color:#888;}
        li:nth-child(21){background-color:#777;}
        li:nth-child(21){background-color:#666;}
        li:nth-child(22){background-color:#555;}
        li:nth-child(23){background-color:#444;}
        li:nth-child(24){background-color:#333;}
        li:first-child:hover{cursor:pointer;}
      </style>
     </head>
     <body>
            <h2>常用颜色值</h2>
            <ul class="color">
                <li>red</li><li>green</li><li>blue</li><li>yellow</li><li style="color:#fff">black</li><li>white</li>
                <li>orange</li><li>pink</li><li>purple</li><li>gray</li><li>lightgreen</li>
                <li>lightblue</li><li>#eee</li><li>#ddd</li><li>#ccc</li><li>#bbb</li><li>#aaa</li><li>#999</li>
                <li>#888</li><li>#777</li><li>#666</li><li>#555</li><li>#444</li><li>#333</li>
            </ul>
     </body>
    </html>
    haley欢迎您来访本博客。此博客是作者在工作中的一个记事本,方便下次遇到同样问题时,以最快的速度解决掉遇到的问题。如果您发现哪里写的不对,欢迎给我留言,让我们一起进步。不胜感激!
  • 相关阅读:
    linux C总结篇(进程)
    进程与线程的区分
    递归的两种思路
    Linux下git与github的一般使用
    文件读写和文件指针的移动
    文件的创建,打开与关闭
    一个简单脚本
    linux 三剑客命令(grep,sed ,awk)
    常用正则表达式
    PAT:1002. A+B for Polynomials (25) 部分错误
  • 原文地址:https://www.cnblogs.com/haley168/p/color.html
Copyright © 2011-2022 走看看