css高级技巧

精灵图的使用在这里插入图片描述

用切片工具选取区域,左下角有区域的长宽和x轴y轴坐标

<style>
        .box1 {
            width: 60px;
            height: 60px;
            margin: 100px auto;
            background: url(images/jingling.png) no-repeat -182px 0;
           
        }
        .box2 {
            width: 30px;
            height: 30px;
            margin: 150px auto;
            background: url(images/jingling.png) no-repeat -152px -106px;
        }
    </style>



字体图标的使用

去/https://icomoon.io/下载字体图标,放到根目录下

 <style>
 @font-face {
  font-family: 'icomoon';
  src:  url('fonts/icomoon.eot?mu8g5e');
  src:  url('fonts/icomoon.eot?mu8g5e#iefix') format('embedded-opentype'),
    url('fonts/icomoon.ttf?mu8g5e') format('truetype'),
    url('fonts/icomoon.woff?mu8g5e') format('woff'),
    url('fonts/icomoon.svg?mu8g5e#icomoon') format('svg');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
span {
    font-size: 50px;
    color: aqua;
  font-family: 'icomoon';

}
    </style>

<body>
    <span></span>
    <span></span>
    <span></span>
    <span></span>

    
</body>



三角的做法

1.等腰三角形

  <style>
  
.box {
    width: 0;
      height: 0;
      line-height: 0;
      font-size: 0;
      border: 10px solid transparent;
      border-left-color:red ;
      margin: 300px auto;
  }
    </style>

在这里插入图片描述
2.直角三角形

 .box {
    width: 0;
    height: 0;
    border-color: transparent red transparent  transparent;
    border-style: solid;
    border-width: 50px 15px 0 0;
    margin: 100px auto;
  }

在这里插入图片描述



用户界面样式-鼠标样式

 <ul>
        <li style="cursor: default;">默认默认默认默认默认默认</li>
        <li style="cursor: pointer;"> 小手小手小手小手小手小手</li>
        <li style="cursor: move;">移动移动移动移动移动移动移动</li>
        <li style="cursor: text;">文本文本文本文本文本文本文本</li>
        <li style="cursor: not-allowed;">禁止禁止禁止禁止禁止禁止</li>
    </ul>



去掉表单轮廓线和防止拖拽文本域

input { outline:none; }



textarea { resize:none; }
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值