CSS技巧之向下箭头

思路:
使用◇符号(可在输入法的软键盘找到该符号),使用定位选择位置,并隐藏溢出的上半部分
细点:
1.使用i标签的楷体属性把◇变大
2.给i只有◇符号一半的高度,并隐藏溢出,正常显示一个向上箭头
3.对s使用绝对定位,使用top属性并为负值使i容器显示向下箭头

<!DOCTYPE>
<html>
<head>
  <meta charset="utf-8">
  <title>向下箭头</title>
  <style type="text/css">
    i{
      font-style: normal;/* 使其字体正常 */
    }
    s{
      text-decoration: none;/*使删除线消失*/ } .content{ width:300px; height: 300px; margin: 50px auto 0;/*左右居中,top值50px*/ border:1px solid #ccc; } .set{ width:100px; margin: 20px auto;/*左右居中,上下20px*/ position: relative; } .set i{ font-size: 15px;/*字号*/ line-height: 15px;/*行高*/ font-family: '楷体';/*字体*/ /* font: 15px/15px '楷体'; 上述总写*/ padding: 0 10px; position: absolute;/*绝对定位*/ top: 7px; right: 5px; width: 15px; height: 7px; overflow: hidden;/*隐藏溢出*/ } .set s{ position: absolute; top:-7px; } </style> </head> <body> <div class="content"> <div class="set"> 更多设置 <i><s>◇</s></i> </div> </div> </body> </html>

 

转载于:https://www.cnblogs.com/lyxuefeng/p/9048544.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值