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. Spring Boot集成Mybatis双数据源

    这里用到了Spring Boot + Mybatis + DynamicDataSource配置动态双数据源,可以动态切换数据源实现数据库的读写分离. 添加依赖 加入Mybatis启动器,这里添加了D ...

  2. Struts2的Action访问

    ● 示例项目结构 ●  demo1.jsp <%@ page language="java" import="java.util.*" pageEncod ...

  3. Oracle或PL/SQL自动断开连接解决参考

    ORACLE自动断开数据库连接解决办法       方法一.直接修改资源配置文件     分三个步骤在sqlplus环境下完成.     第一步,查询资源文件,找到CONNECT_TIME所在的pro ...

  4. pyhon if分支

    在python中,最常用的就是if判断,if判断可以分为单次判断和多次判断 单次判断 if   条件 : (条件成立执行我) else:(else也可以没有,最近的else对应最近的if语句) (条件 ...

  5. lg5169 xtq的异或和

    题目 根据一些众所周知的结论,我们先跑一棵生成树出来,之后把所有简单环都搞出来,那么\(u\)到\(v\)的路径一定可以由树上的路径和一些简单环拼起来得到 把所有简单环都插到一个线性基里,之后dfs一 ...

  6. 配置ssh免密登录问题

    有小伙伴的系统需要做免密登录.配置比较简单,ssh-keygen然后生成authorized_keys 文件即可. 但是配置好之后,修改相应用户的家目录权限后,则免密登录就失效了. 经过试验,发现家目 ...

  7. MySQL数据库企业级应用实践(主从复制)

    MySQL数据库企业级应用实践(主从复制) 链接:https://pan.baidu.com/s/1ANGg3Kd_28BzQrA5ya17fQ 提取码:ekpy 复制这段内容后打开百度网盘手机App ...

  8. 认识和学习BASH alias 给长命令起别名 unalias 取消该别名

    此图反映了shell所在的位置与作用. 既然Shell与KDE和application等都是用户与Kernel的接口,那为什么还要学习呢?书中也给出了答案. 通用性,可以这样理解,也就是所谓的跨平台机 ...

  9. spring中配置Properties对象的方法

    工作中有必要将Properties对象进行注解进入:比如 class Person{ @Autowired private Properties properties; } 如果有这种需求的话,那么需 ...

  10. mybatis中配置文件头

    <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "- ...