美文网首页
Css样式整理

Css样式整理

作者: 头头_d92d | 来源:发表于2020-04-03 11:41 被阅读0次
带边框的小箭头.png
<div class="border-triangle-right"></div>
<style>
        .border-triangle-right {
            width: 100px;
            height: 30px;
            border: 1px solid #1d9cd6;
            position: relative;
            border-radius: 6px;
            z-index: 999;
        }
        
        .border-triangle-right:after,
        .border-triangle-right:before {
            content: "";
            position: absolute;
            width: 0;
            height: 0;
            border: 6px solid transparent;
            border-left-color: #1d9cd6;
            right: -12px;
            margin-left: -4px;
            top: 33%;
        }
        
        .border-triangle-right:after {
            border-left-color: #fff;
            top: 33%;
            right: -10px;
        }
    </style>
标签页横线带小箭头

标签页横线带小箭头

<a class="active" href="#">栏目1</a>
<style>
  .active{
    position: relative;
  }
  .active::before {
    content: '';
    position: absolute;
    bottom: 0%;
    left: 45%;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid transparent;
    border-bottom: 4px solid #d10a0a;
    z-index: 999;
}
</style>

单行溢出省略号

.text{
  width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

多行溢出省略号

.text{
  overflow : hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

背景色渐变

header {
  background: linear-gradient(left, #168d7d, #77f1e0);
  background: -ms-linear-gradient(left, #168d7d, #77f1e0);
  background: -webkit-linear-gradient(left, #168d7d, #77f1e0);
  background: -moz-linear-gradient(left, #168d7d, #77f1e0);
}

相关文章

  • 九月第三周学习笔记分享

    整理 代码/整理 术语整理 代码/整理 CSS:层叠样式表 CSS中的元素样式设置叫做类选择器:.be-text{...

  • css样式整理

    字体属性:(font) 大小 {font-size: x-large;}(特大) xx-small;(极小) 一般...

  • css样式整理

    css样式整理 字体属性:(font) 大小 {font-size: x-large;}(特大) xx-small...

  • Css样式整理

    标签页横线带小箭头 单行溢出省略号 多行溢出省略号 背景色渐变

  • css样式入门书目录

    css样式-字体属性 css样式-背景属性 css样式-边框属性 css样式-列表属性 css样式-定位属性 cs...

  • css常用样式整理

    以前写样式时,有几个比较常用的属性经常忘记,烂笔头写下来方便记忆与查询。 浏览器滚动条样式: 文本溢出隐藏: 文本...

  • [jQuery]设置css样式

    获取css样式 设置单个css样式 设置多个css样式

  • CSS基础(二)

    1 - CSS样式的引入 CSS样式的引入可以采用三种方式: 内联式css样式 嵌入式CSS样式 外部式CSS样式...

  • 切图需要的准备

    样式 重置样式(reset.css) 公共样式(commo.css) 独立样式(例如首页:index.css) 重...

  • jQuery学习:css操作/属性操作

    css操作 修改单个样式.css(name,value) 修改多个样式.css(obj) 获取样式.css(nam...

网友评论

      本文标题:Css样式整理

      本文链接:https://www.haomeiwen.com/subject/owjcbqtx.html