今天看到一篇不错文章,在原来CSS3图形创建基础上扩展了很多. 这里记录总结下 心形 原理:利用 圆形 和 正方形实现 HTML: <div class="heartShaped"> <h1>heartShaped</h1> </div> CSS: .heartShaped { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(…
<CSS 魔法系列>继续给大家带来 CSS 在网页中以及图形绘制中的使用.这篇文章给大家带来的是纯 CSS 绘制五角星.六角形.五边形.六边形.心形等等. 我们的网页因为 CSS 而呈现千变万化的风格.这一看似简单的样式语言在使用中非常灵活,只要你发挥创意就能实现很多比人想象不到的效果.特别是随着 CSS3 的广泛使用,更多新奇的 CSS 作品涌现出来. 您可能感兴趣的相关文章 CSS3 在网页设计中的20佳惊艳应用 推荐12个漂亮的 CSS3 按钮实现方案 推荐10个非常优秀的 CSS3 开…
1.聊天背景气泡: css代码如下: #talkbubble {width: 120px;margin:auto; background: red; position: relative; -moz-border-radius: 10px;-webkit-border-radius: 10px; border-radius: 10px; } #talkbubble:before {;; border-top: 13px solid transparent; border-right: 26px…
.heart { width: 10px; height: 10px; /* position: fixed; */ background: #fff; transform: rotate(45deg); -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); display: inline-block; } .heart:after,.heart:before { content: ''; width: inherit;…
用1个标签实现心形图案,show you the code; <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style type="text/css"> .container{ margin-top: 50px; text-align:…
本文将利用border属性实现简单几何的绘制: 效果图: 正八角星 说明:采用两个正方形以中心进行旋转叠加: /* 八角星 */ #burst-8 { background: #6376ff1f; width: 80px; height: 80px; position: relative; text-align: center; transform: rotate(20deg); } #burst-8:before { content: ""; position: absolute;…
为了在页面中利用CSS3绘制图形,在页面中定义 <div  class="container"> <div class="shape"></div> </div> 其中,container作为显示图形的画布(容器),shape描述所绘制的图形. 定义.container的样式规则如下: .container { margin: 0 auto; width: 300px; height:300px; position:…
基础技能1 - 神奇的border 我们先来画一个长方形: .Rectangle { height: 100px; width: 200px; background: darkgray; border-width: 50px; border-style: solid; border-top-color: cyan; border-bottom-color: blue; border-left-color: orange; border-right-color: green; } 有没有发现什么?…
很少会有人意识到,当浏览器绘制的border,会有一个角度的问题.我们就是得用这样的一个技巧来制作三角的效果.我们只需要保证一边的边框是有色,其他边框色为透明色,这样我们就很容易制作出三角形,然后改变其大小来实现不同的效果.(最早发现使用border制作三角形是人物Eric Meyer的发现的)下面就让我给大伙罗列一下子. .css-arrow-multicolor { border-color: red green blue orange; border-style:solid; border…
  http://www.w3cplus.com/css/css-simple-shapes-cheat-sheet http://www.cnblogs.com/powertoolsteam/p/css-create-irregular-shapes.html 通过图片实现不规则DIV http://www.cnblogs.com/leshao/p/5674720.html 通过after+旋转实现 1.正方形(square): CSS Code: .square { width: 100px…