CSS实现圆角的 25 种技巧分享
原文地址:http://www.devwebpro.com/25-rounded-corners-techniques-with-css/
* This post is regularly updated. *
Rounded corners is one of the most popular and frequently requested
CSS techniques even the father of internet Google
also launch the rounded corners style markup
with her Google Adsense
and let users to custom their ads recently. Actually, there are a lot
of methods and techniques to create rounded corners with Cascading
Stylesheets. Some are quite simple just need pure CSS, and a part of
them need 2 to 4 background corner images and Javascript. So i select
some quality and usable rounded corners with CSS techniques for you to
have the best choices.
Note:
Here are some additional related
articles on DevWebPro you should also take a look at:
- Advantages of Using Corners Without Images
- Smooth Your Design and Round Those Corners!
- Rounded Corners Using CSS
Techniques
ThrashBox – create rounded-corner boxes with visual flare and the
absolute minimal amount of semantically correct markup.
Even More Rounded Corners With CSS – nice technique with fluid
rounded corner dialogs and support for borders, alpha transparency
throughout, gradients and patterns.
DomCorners – a very simple technique for getting rounded corners.
virtuelvis.com Rounded corners in CSS – allow you to retrofit this to
existing designs without altering any markup.
Transparent custom corners and borders version 2 – a technique for
creating custom corners and borders with optional alpha transparency.
CSS Teaser Box with rounded corners – by Roger Johansson, the same
author of Transparent custom corners and borders version 2.
News List – was designed to display links to recent news.
CSS Liquid Round Corners – a re-usable rounded box, note that it
needs total 6 images for wrap the corners.
Anti-aliased Nifty Corners – based on Nifty Corners and modified by
Steven Wittens.
Simple Box by te
相关文档:
Firefox hr
兼容问题,在ie中正常显示的hr属性设置,在Firefox里面不管怎么弄都是他妈的不出来,改了不少属性,调整了位置,同时搜索了不少文章,仍然不
行,最后看到一篇文章说ff中必须设置背景颜色才有效果的,真是xxx的,这种问题自己闭门造车的话整上个三天三夜都找不到解决办法啊!
把代码贴出来分享下:
hr {
......
CSS 盒模型
网页设计中的每个元素都是长方形的盒子。盒子的尺寸是怎样精确计算的,请看下图:
如果是 Firebug 用户的话(基本和前端有关的都会用到 Firebug 吧 – 糖伴西红柿),就会很熟悉下面的图表了。
这个图表很好地展示了作用于页面上任意盒子的数值。
注意以上两个例子中,margi ......
margin 外边距
border 边框
padding 内边距
也就是说 设置margin 那么他所占据的空白地方会是在边框外面
设置padding 他所占据的空白地方是在边框里面
而且在IE6 一下的版本中 存在这padding 计算错误的BUG
CSS 的宽度属性本来是不包含padding的 但是 在ie下面有的时候宽度是包含padding 所以 建议在不熟悉CSS 在定位 ......
注明:如果要想要在IE6无限级的话需要写多一些JS,其他游览器都可以使用同段js
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equ ......
国内的设计师大都喜欢用px,而国外的网站大都喜欢用em,那么两者有什么区别,又各自有什么优劣呢?
1、IE无法调整那些使用px作为单位的字体大小;
2、国外的大部分网站能够调整的原因在于其使用了em作为字体单位;
3、Firefox能够调整px和em,但是96%以上的中国网民使用IE浏览器(或内核)。
px像素(Pixel),相对长度 ......