分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 网页技术

css基础

发布时间:2023-09-06 01:32责任编辑:郭大石关键词:暂无标签

/*/!*绝对定位(脱离常规文档流)*!/*/
/*position: absolute;*/
/*/!*固定定位(脱离常规文档流)*!/*/
/*/!*position: fixed;*!/*/
/*/!*相对定位(元素原始位置进行偏移量的增减,并继续占用元素原有位置的空间)*!/*/
/*/!*position: relative;*!/*/
/*/!*默认值(静态)*!/*/

 /*/!*position: static;*!/*/

二级导航:

<ul>

  <li></li> 

  <li></li>

  <li>  

    <ul>

      <li></li> 

      <li></li>

      <li></li>

    </ul>

  </li>

</ul>

*/!*设置导航里的内容进行180度旋转,透明,背景色*!/*/
ul>li li{
  opacity: 0;
  transition: all 2s;
  transform: rotatey(180deg);
  background-color: pink;
}

/*/!*设置导航里的内容角度恢复,透明度,延时*!/*/
ul>li:last-child:hover li:nth-of-type(1){
  opacity: 1;
  transition-delay: 0s;
  transform: none;
}

ul>li:last-child:hover li:nth-of-type(2){
  opacity: 1;
  transition-delay: 300ms;
  transform: none;
}

ul>li:last-child:hover li:nth-of-type(3){
  opacity: 1;
  transition-delay: 600ms;
  transform: none;
}

添加下边框(中江到两边)

<ul class="box4">
  <li>nihao1</li>
  <li>nihao2</li>
  <li>nihao3</li>
</ul>

.box4 li{
  list-style: none;
  float: left;
  text-align: center;
  margin-right: 10px;
  position: relative;
}

.box4 li:before{
  content: "";
  position: absolute;
  bottom: 0;
  border: 2px solid;
  width: 0;
  left: 50%;
  transition: all linear 0.5s;
}

.box4 li:hover:before{
  width: 100%;
  left:0;

}

css基础

原文地址:http://www.cnblogs.com/huan123/p/8094414.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved