css的边框设置、显示与隐藏、ul前面的序号删除或修改

 

 

首先对内、外边框进行相应的操作,

#frist{
                width: 100px;
                height: 300px;
                border: 2px dashed red;
                /*边框*/
                /*margin: 10px 20px 30px 40px;/*上右下左*/
                /*外边距*/
                margin-top: 20px;
                /*内边距*/
                padding-left:20px ;
            }

得到如下效果,

然后对进行相应的显示/隐藏,

#frist{
                width: 100px;
                height: 300px;
                border: 2px dashed red;
                /*边框*/
                /*margin: 10px 20px 30px 40px;/*上右下左*/
                /*外边距*/
                margin-top: 20px;
                /*内边距*/
                padding-left:20px ;
            }
            #second{
                width: 200px;
                height: 250px;
                border: 1px solid black;
                display: none;    
            }
            #frist:hover +#second{
                display: block;    
            }

 

效果如下:

当鼠标移到<div id="frist"></div>时显示#second,

最后对ul前面的序号进行删除操作,如下:

ul{
                list-style: none;
                /*list-style-image:url(wyw.jpg) ;*/ /*用图片代替*/
            }
<ul>
            <li>你</li>
            <li>我</li>
            <li>他</li>
        </ul>

得到的效果如下:

 

 

posted on 2018-08-11 20:24  孙崇武  阅读(617)  评论(0编辑  收藏  举报

导航