首页 > Web开发 > 详细

记一次 css样式的使用

时间:2020-05-12 19:09:24      阅读:47      评论:0      收藏:0      [点我收藏+]

1.实现效果:

技术分享图片

1.1.代码

<div class="s_center">
   <span style="letter-spacing: 10px;">居中文字</span>  <!--letter-spaciing:设置文字间间距-->
</div>
<style scoped>
   .s_center{
      z-index:999;          /*层级设置*/
      width: 200px;
      height: 200px;
      line-height: 200px;    /*上下: line-height 要和 height设置高度一样*/
      text-align: center;    /* 左右 */
      border: 1px solid #cccccc;  /* 设置 实现边框*/
      box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);   /* 设置 边框阴影*/
      opacity:1;   /* 背景透明度 0:透明,1 :不透明 ,0-1间:设置不同的透明度*/
      border-radius: 4px;   /* 设置边框圆角 */
    }
</style>

 

2. element-ui 隐藏滚动条

  /*隐藏滚动条*/
  ::-webkit-scrollbar {
    height: 0 !important;
  }
  ::-webkit-scrollbar {
    height: 0 !important;
  }

3.设置无边框,无选中样式

    border: none;
    outline: none;

 4.定位

<div style="position:relative;">  
    相对的父标签
    <div style="positon:absolute;">    <!--fix:绝对定位-->
        相对定位的子标签
    </div>
</div>  

 

记一次 css样式的使用

原文:https://www.cnblogs.com/Vera-y/p/12877845.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!