所需图片:

                                                                                         

  corners-type1     corners-type2    corners-type3   corners-type4     corners-type5    roundedbox-type5-bg

<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Previe of Type - Easy rounded corners, by Ignacio Ricci (www.ignacioricci.com)</title>
<style>
body {margin:; padding:40px; font:% Georgia, "Times New Roman", Times, serif; background:#FFF;} /* Rounded-cornered divs -*/
.roundedBox {position:relative; padding:17px; margin:10px ;} /*- All the corners -*/
.corner {position:absolute; width:17px; height:17px;} /*- Each corner -*/
.topLeft {top:; left:; background-position:-1px -1px;}
.topRight {top:; right:; background-position:-19px -1px;}
.bottomLeft {bottom:; left:; background-position:-1px -19px;}
.bottomRight {bottom:; right:; background-position:-19px -19px;}
/*- Type1 - Blue -*/
#type1 {background-color:#CCDEDE;}
#type1 .corner {background-image:url(img/corners-type1.gif);} /*- Type2 - Green -*/
#type2 {background-color:#CDDFCA;}
#type2 .corner {background-image:url(img/corners-type2.gif);} /*- Type3 - Violet -*/
#type3 {background-color:#D3CADF;}
#type3 .corner {background-image:url(img/corners-type3.gif);} /*- Type4 - Red with border -*/
/* We change the corners' position and add the border */
#type4 {background-color:#CCACAE; border:1px solid #AD9396;}
#type4 .corner {background-image:url(img/corners-type4.gif);}
#type4 .topLeft {top:-1px; left:-1px;}
#type4 .topRight {top:-1px; right:-1px;}
#type4 .bottomLeft {bottom:-1px; left:-1px;}
#type4 .bottomRight {bottom:-1px; right:-1px;} /*- Type5 - With gradient -*/
/* We change the top corners' height, and the bottom corners background-position. We must also add to the containing div a gradient to repeat in x. */
#type5 {background:#FECBCA url(img/roundedbox-type5-bg.png) repeat-x ; min-height:110px;}
#type5 .corner {background-image:url(img/corners-type5.png);}
#type5 .topLeft,
#type5 .topRight {height:140px;}
#type5 .bottomLeft {background-position:-1px -142px;}
#type5 .bottomRight {background-position:-19px -142px;} </style>
</head> <body> <!-- Type1: Blue -->
<div class="roundedBox" id="type1">
<strong>My content in roundedBox Type </strong>
<div class="corner topLeft"></div><div class="corner topRight"></div><div class="corner bottomLeft"></div><div class="corner bottomRight"></div>
</div> <!-- Type2: Green -->
<div class="roundedBox" id="type2">
<strong>My content in roundedBox Type </strong>
<div class="corner topLeft"></div><div class="corner topRight"></div><div class="corner bottomLeft"></div><div class="corner bottomRight"></div>
</div> <!-- Type3: Violet -->
<div class="roundedBox" id="type3">
<strong>My content in roundedBox Type </strong>
<div class="corner topLeft"></div><div class="corner topRight"></div><div class="corner bottomLeft"></div><div class="corner bottomRight"></div>
</div> <!-- Type4: Red with border -->
<div class="roundedBox" id="type4">
<strong>My content in roundedBox Type </strong>
<div class="corner topLeft"></div><div class="corner topRight"></div><div class="corner bottomLeft"></div><div class="corner bottomRight"></div>
</div> <!-- Type5: With gradient -->
<div class="roundedBox" id="type5">
<strong>My content in roundedBox Type </strong>
<div class="corner topLeft"></div><div class="corner topRight"></div><div class="corner bottomLeft"></div><div class="corner bottomRight"></div>
</div> </body>
</html>

CSS sprite 圆角——源代码的更多相关文章

  1. css sprite,css雪碧图生成工具V3.0更新

    V3.0主要改进 1.增加了单独添加单张图片以及删除单张图片的功能 2.增加了生成.sprite文件用以保存雪碧图信息 3.增加了打开.sprite文件功能 什么是css sprite CSS spr ...

  2. css sprite 调整大张图片中小图标的大小

    直接说解决方法: 假设一张拼合好的大图大小是:900 x 1000 px (如上图) 现在想取图中左上角的河马图标,并缩小图标的大小. 正常取图: .sprite { background: url( ...

  3. HTML CSS SPRITE 工具

    推荐一个CSS SPRITE工具 网盘分享:http://pan.baidu.com/s/1sjx7cZV

  4. CSS Sprite雪碧图应用

    在写网页过程中,会遇到这种需要使用多个小图标: 如上图中的「女装」文字左边的图标.容易想到的解决方法是为每张图片加入<img>标签,但这样做会增加HTTP请求数量,影响网站加载速度.比这更 ...

  5. CSS雪碧,即CSS Sprite 简单的例子

    CSS Sprite生成工具 http://pan.baidu.com/s/1gdGQwiJ 工具可将多幅图片整合一张,并生成CSS. HTML代码 <style> .img{backgr ...

  6. 使用compass自动合并css雪碧图(css sprite)

    本文转载自: 使用compass自动合并css雪碧图(css sprite)

  7. CSS Sprite 图标

    HTML <body> <!-- ul.sprite>li*5>s.s-icon+a{CSS Sprite} --> <!-- 以上是Sublime Text ...

  8. CSS Sprite 雪碧图制作

    CSS Sprite 雪碧图,简单来说就是: 为了提高网页的性能,减少加载次数,将一些不会经常随网站内容变化的小图标,集中放在一张大图上,将该图应作为background-image 嵌入页面中,在需 ...

  9. CSS Sprite的优缺点分析

    目前大多数的开发人员对这个技术都有相当地掌握,也有很多关于它的教程和文章.几乎所有的文章中都宣称设计师和开发人员都应该使用 CSS sprite 来减少 HTTP 请求数,并且节省一些流量.这个技术被 ...

随机推荐

  1. 视网膜New iPad与普通分辨率iPad页面的兼容处理

    一.这是篇经验分享 就算不是果粉也应该知道,iPad2与new iPad的重大区别之一就是显示屏的分辨率.new iPad显示屏被称之为“视网膜显示屏”,其设备分辨比(之前有详细介绍,点击这里查看)是 ...

  2. ActiveMQ中Session设置的相关理解

    名词解释: P:生产者 C:消费者 服务端:P 或者 ActiveMQ服务 客户端:ActiveMQ服务 或者 C 客户端成功接收一条消息的标志是这条消息被签收.成功接收一条消息一般包括如下三个阶段: ...

  3. embed标签遮住div层

    依然是上次的那个返工友情项目,当时帮忙用jquery ui写了一个漂浮的投票箱,就是类似点击一个项目然后就收藏到了投票箱中的效果.. 虽然不是很复杂,但是由于页面上有大面积的由kindeditor上传 ...

  4. springmvc 数据对象回绑

    springmvc中,由页面 post到 controller,对象可以在form里面设置modelAttribute达到回绑的目的. 但是如果对象里面有复杂的非String,int的对象,则要在co ...

  5. [转载]c# winform 获取当前程序运行根目录

    // 获取程序的基目录. System.AppDomain.CurrentDomain.BaseDirectory // 获取模块的完整路径. System.Diagnostics.Process.G ...

  6. VARCHAR2转换为CLOB碰到ORA-22858错误

    近日工作中发现有一张表的字段类型建错了,本应是BLOB类型却被别人建成了VARCHAR2(200),修改时oracle却提示“ORA-22858 invalid alteration of datat ...

  7. CI框架大纲总结

    一.大纲 1.codeigniter框架的授课内容安排 2.codeigniter框架的简介 |-----关于框架的概念 |-----使用CI框架的好处 |-----为什么选择CI框架 3.codei ...

  8. POJ2349+prim

    最小生成树 /* prim 题意:给定一些点,一些卫星,一个卫星能连接两个点,点和点之间通信有一定的距离限制. 问能使得所有的点联通的最小距离. */ #include<stdio.h> ...

  9. tomcat 设置默认编码格式

    在tomcat目录下 conf文件夹下的server.xml中: <Connector port="80" protocol="HTTP/1.1"     ...

  10. HeadFirst设计模式之适配器模式

    一. 1. 2.The Adapter Pattern converts the interface of a class into another interface the clients exp ...