1、  向上三角形
  CSS核心代码
  .triangle-up {
   width: 0;
   border-left: 50px solid transparent;
   border-right: 50px solid transparent;
   border-bottom: 100px solid red;
  }
2、  左上三角形
CSS核心代码
.triangle-topleft {
width: 0;
border-top: 100px solid red;
border-right: 100px solid transparent;
}
3、  弧形尾箭头
CSS核心代码
  .curvedarrow {
   position: relative;
   width: 0;
   border-top: 90px solid transparent;
   border-right: 90px solid red;
   transform: rotate(10deg) translateX(100%);
  }
  .curvedarrow:after {
   content: "";
   position: absolute;
   border: 0 solid transparent;
   border-top: 30px solid red;
   border-radius: 200px 0 0 0;
   top: -120px; left: -90px;
   width: 120px; height: 120px;
   transform: rotate(45deg);
  }
4、  吃豆人
CSS核心代码:
  .pacman {
   width: 0px; height: 0px;
   border-right: 60px solid transparent;
   border-top: 60px solid red;
   border-left: 60px solid red;
   border-bottom: 60px solid red;
   border-top-left-radius: 60px;
   border-top-right-radius: 60px;
   border-bottom-left-radius: 60px;
   border-bottom-right-radius: 60px;
  }
5、  带尖角的说话泡泡
CSS核心代码:
  .talkbubble {
   width: 120px; height: 80px;
   background: red;
   position: relative;
   border-radius: 10px;
  }
  .talkbubble:before {
   content: "";
   position: absolute;
   right: 100%; top: 26px;
   border-top: 13px solid transparent;
   border-right: 26px solid red;
   border-bottom: 13px solid transparent;
  }
6、bilibili电视机
CSS核心代码
  .tv {
   position: relative;
   width: 200px; height: 150px;
   margin: 20px 0;
   background: red;
   border-radius: 50% / 10%;
   color: white;
   text-align: center;
   text-indent: .1em;
  }
  .tv:before {
   content: '';
   position: absolute;
   top: 10%; bottom: 10%; right: -5%; left: -5%;
   background: inherit;
   border-radius: 5% / 50%;
  }
7、放大镜
.magnifying-glass {
font-size: 10em;
display: inline-block;
width: 0.4em; height: 0.4em;
border: 0.1em solid red;
position: relative;
border-radius: 0.35em;
}
.magnifying-glass:before {
content: "";
display: inline-block;
position: absolute;
right: -0.25em; bottom: -0.1em;
border-width: 0;
background: red;
width: 0.35em; height: 0.08em;
transform: rotate(45deg);
}
8、长长的指向图形
CSS核心代码:
.pointer {
width: 200px; height: 40px;
position: relative;
background: red;
}
.pointer:after {
content: "";
position: absolute;
left: 0; bottom: 0;
border-left: 20px solid white;
border-top: 20px solid transparent;
border-bottom: 20px solid transparent;
}
.pointer:before {
content: "";
position: absolute;
right: -20px; bottom: 0;
border-left: 20px solid red;
border-top: 20px solid transparent;
border-bottom: 20px solid transparent;
}
上面展示的效果可能部分实用性不大,但是使用css制作三角和圆有效果应用还是很多了,特别是用来制作tips效果。

利用纯css写三角形,弧度箭头,吃豆人,气泡。放大镜,标签的源码的更多相关文章

  1. 纯CSS写三角形-border法

    (1)有边框的三角形 我们来写下带边框的三角形. 如果是一个正方形,我们写边时,会用到border,但我们这里讨论的三角形本身就是border,不可能再给border添加border属性,所以我们需要 ...

  2. 关于纯css写三角形在firefox下的锯齿问题

    相信很多人都用过利用border来实现小三角箭头,百度一下,这类的文章多如牛毛,这里我还是啰嗦点把常用的方法陈列出来: .triangle_border_up{ width:; height:; bo ...

  3. 纯css 写三角形

    <div style="width: 0;height: 0;border-left: 6px solid transparent;border-right: 6px solid tr ...

  4. 纯 CSS 实现三角形尖角箭头的实例

    上次无意中发现了个使用纯 CSS 实现三角形尖角箭头的方法 http://blog.csdn.net/zhouzme/article/details/18901943 ,但没有怎么用上,也没有详细完整 ...

  5. 三种纯CSS实现三角形的方法

    看到像上图这样的 tip 的小三角,你会怎么办? 切个图上去?恩,不错,简单,兼容性也一级棒,不但好控制,那点小东西也增加不了多少图片的大小.但有没有更好更讲究技巧的办法呢?哈哈,那必须有啊,而且还不 ...

  6. CSS绘制三角形和箭头,不用再用图片了

    前言 还在用图片制作箭头,三角形,那就太lou了.css可以轻松搞定这一切,而且颜色大小想怎么变就怎么变,还不用担心失真等问题. 先来看看这段代码: /**css*/.d1{ width: 0; he ...

  7. 纯css写带小三角对话框

    在实际样式中经常会遇到要写类似对话框的样式,而这种样式往往会有一个小三角,如下所示: 那么如何用css写出来呢,其实很简单,先让父元素相对定位,然后运用css的伪类before或after.就可以写个 ...

  8. CSS 魔法系列:纯 CSS 绘制三角形(各种角度)

    我们的网页因为 CSS 而呈现千变万化的风格.这一看似简单的样式语言在使用中非常灵活,只要你发挥创意就能实现很多比人想象不到的效果.特别是随着 CSS3 的广泛使用,更多新奇的 CSS 作品涌现出来. ...

  9. CSS学习笔记(8)--纯CSS绘制三角形(各种角度)

    纯CSS绘制三角形(各种角度) CSS三角形绘制方法,学会了这个,其它的也就简单.   我们的网页因为 CSS 而呈现千变万化的风格.这一看似简单的样式语言在使用中非常灵活,只要你发挥创意就能实现很多 ...

随机推荐

  1. 使用apache搭建tomcat集群

    1.安装apache 1.1 下载ApacheX64.rar,并解压 1.2 修改Apache24\conf\httpd.conf文件 配置根目录: 配置ip和端口 1.2 安装apache服务器 以 ...

  2. vue组件库的基本开发步骤

    市面上目前已有各种各样的UI组件库,比如 Element 和 iView,他们的强大毋庸置疑.但是我们面临的情况是需求越来越复杂,当它们不能再满足我们需求的时候,这个时候就有必要开发一套属于自己团队的 ...

  3. 换了SSD发现plank也好了

    我的Dock用的是plank,很简单很好用.为什么不用Docky还有其他什么玩意儿呢?plank很简单很好用,资源占用很少,可以智能隐藏,you nearly can't feel it but yo ...

  4. 安装express 出现 错误

    w 在网上找了很多都解决不了问题,直到换了文件新建路径就可以了 成功: 学习就是不断发现问题解决问题的过程

  5. 关于 webpack 的研究

    webpack的官网:http://webpack.github.io/ 安装webpack 演示项目安装,使用全局安装:npm install webpack -g 真正的项目使用依赖式安装,保证在 ...

  6. 外部操作获取iframe的东西

    原生js  document.iframe[id].contentWindow.document.querySelector(el).innerHTML    jq    $(window.ifram ...

  7. JQuery 浮动DIV显示提示信息并自动隐藏

    /** * 浮动DIV定时显示提示信息,如操作成功, 失败等 * @param string tips (提示的内容) * @param int height 显示的信息距离浏览器顶部的高度 * @p ...

  8. Yii2-rbac

    下面介绍一个 yii2.0 的 Rbac 权限设置,闲话少说,直接上代码,   1.首先我们要在组件里面配置一下 Rbac ,如下所示(common/config/main-local.php或者ma ...

  9. PHP ftp_nlist() 函数

    「大理石平台维修」大理石平台维修完后需要怎么处理? 定义和用法 ftp_nlist() 函数返回 FTP 服务器上指定目录的文件列表. 如果成功,则返回指定目录下的文件名组成的数组.如果失败,则返回 ...

  10. delphi 给程序加托盘图标

    一些程序运行时,会在桌面的右下角显示一个图标(任务栏的右边),这类图标称为 托盘.托盘是一个PNotifyIconDataA类型的结构,要增加托盘图标其实就是对结构PNotifyIconDataA的操 ...