栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

如何仅在CSS中制作此箭头?

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

如何仅在CSS中制作此箭头?

如果箭头之间的空间并不需要是透明的(这是实心的颜色),您可以使用:before和:after创建边缘(没有在DOM新元素)

基本上,它将创建具有所需边框的旋转正方形,并将其相应放置

#flowBoxes {    margin:auto;    padding:20px;    min-width:700px;}#flowBoxes div {    display:inline-block;    position:relative;    height:25px;    line-height:25px;    padding:0 20px;    border:1px solid #ccc;    margin-right:2px;    background-color:white;}#flowBoxes div.right:after{    content:'';    border-top:1px solid #ccc;    border-right:1px solid #ccc;    width:18px;    height:18px;    position:absolute;    right:0;    top:-1px;    background-color:white;    z-index:150;    -webkit-transform: translate(10px,4px) rotate(45deg);       -moz-transform: translate(10px,4px) rotate(45deg);        -ms-transform: translate(10px,4px) rotate(45deg);         -o-transform: translate(10px,4px) rotate(20deg); transform: translate(10px,4px) rotate(45deg);}#flowBoxes div.left:before{    content:'';    border-top:1px solid #ccc;    border-right:1px solid #ccc;    width:18px;    height:18px;    position:absolute;    left:0;    top:-1px;    background-color:white;    z-index:50;    -webkit-transform: translate(-10px,4px) rotate(45deg);       -moz-transform: translate(-10px,4px) rotate(45deg);        -ms-transform: translate(-10px,4px) rotate(45deg);         -o-transform: translate(-10px,4px) rotate(20deg); transform: translate(-10px,4px) rotate(45deg);}#flowBoxes .active{    background-color:green;    color:white;}#flowBoxes div.active:after{    background-color:green;}<div id="flowBoxes">        <div >Diersoort / I&amp;R</div>        <div >Model</div>        <div >Varianten</div>        <div >Bedrukkingen</div>        <div >Bevestiging</div></div>


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/398798.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号