RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
web前端开发的定位和渐变线知识点的应用

这周学习到了一个选项卡的实现,但是涉及到js来完善整个功能,所以今天不再加以叙述。主要从以下两点讲解:定位和渐变线
定位:position:fixed/relative/absolute; 分别是固定相对和绝对,前面笔记已讲述。
溢出省略号(主要以下三句连用):
overflow:hidden;
text-overflow:eclipse;
white-space:nowarp;
渐变线
::before /::after
{
content:"";}

创新互联主营麻城网站建设的网络公司,主营网站建设方案,成都App定制开发,麻城h5微信小程序搭建,麻城网站营销推广欢迎麻城等地区企业咨询

linear-gradient(270deg,red,yellow,green,pink) 线性渐变
以下是我自己写的一个关于该知识点的一个代码,仅供参考
html代码如下
右边定位













css 如下:/右边定位/
.right-fixed{
width: 60px;
height: 464px;
background:white;
position: fixed;
top:30%;
right:80px;
z-index: 1;
overflow: hidden;
}
.right-fixed ul li{
width:60px ;
height: 58px;
position: relative;
padding:10px 15px;
}
.right-fixed ul li a{
font-size:14px;
color: #333;
line-height: 19px;
}
.right-fixed ul li:hover{
background:#c81623 ;
cursor: pointer;
}
.right-fixed ul li:hover a{
color: white!important;
}
.right-fixed ul li img{
position: absolute;
top:0px;
left: 0;
width:60px;
height:58px ;
}
.right-fixed ul li img:last-of-type{
display: none;
}
.right-fixed ul li:hover img:last-of-type{
display: block;
}
.right-fixed ul li span{
text-align: center;
display: inline-block;
width:30px;
height: 20px;
}
.right-fixed ul li a.active{
color:#c81623 ;
}
.right-fixed ul li::after{
content: "";
position: absolute;
top:58px;
left: 5px;
right:5px;
height: 1px;
width: 50px;
background: linear-gradient(270deg,#fff,#eee,#fff);
}
涉及图片和效果图片如下
web前端开发的定位和渐变线知识点的应用web前端开发的定位和渐变线知识点的应用
web前端开发的定位和渐变线知识点的应用


标题名称:web前端开发的定位和渐变线知识点的应用
分享地址:http://sczitong.cn/article/jsjcoo.html