惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Last Watchdog
The Last Watchdog
博客园_首页
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
美团技术团队
小众软件
小众软件
V
V2EX
博客园 - Franky
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
The GitHub Blog
The GitHub Blog
Microsoft Security Blog
Microsoft Security Blog
Attack and Defense Labs
Attack and Defense Labs
S
Security Affairs
Simon Willison's Weblog
Simon Willison's Weblog
I
Intezer
T
The Exploit Database - CXSecurity.com
有赞技术团队
有赞技术团队
S
Schneier on Security
人人都是产品经理
人人都是产品经理
Security Archives - TechRepublic
Security Archives - TechRepublic
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
K
Kaspersky official blog
PCI Perspectives
PCI Perspectives
AI
AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
罗磊的独立博客
O
OpenAI News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The Register - Security
The Register - Security
V
Vulnerabilities – Threatpost
GbyAI
GbyAI
博客园 - 【当耐特】
C
Cisco Blogs
大猫的无限游戏
大猫的无限游戏
Help Net Security
Help Net Security
Google DeepMind News
Google DeepMind News
S
Securelist
Application and Cybersecurity Blog
Application and Cybersecurity Blog
P
Proofpoint News Feed
博客园 - 三生石上(FineUI控件)
雷峰网
雷峰网
L
LangChain Blog
SecWiki News
SecWiki News
博客园 - 叶小钗
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V2EX - 技术
V2EX - 技术
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
J
Java Code Geeks
L
LINUX DO - 热门话题
Cisco Talos Blog
Cisco Talos Blog

博客园 - 9who

Nopcommerce2.70版本如何在vs2010中打开 UrlRewriter 伪url的配置 - 9who - 博客园 百度,google,雅虎等搜索引擎的高级搜索语法 开发记录——触发器实现 数据库关联字段 FCKEditor在.net的使用 JS函数验证总结 - 9who - 博客园 petshop4.0 各个文件的作用 如何构造一个C#语言的爬虫蜘蛛程序 ASP.NET26个常用性能优化方法 CSS基本布局16例 CSS命名规范(建议版) SQL2005数据库转换到SQL2000 我的几个.NET编程习惯 SQL2005示例数据库|AdventureWorks下载安装|NORTHWND下载安装|PUBS下载安装 (转)Ext与.NET超完美整合 .NET开发者的超级优势 C#与OOP之 接口 C#中面向对象的OOP概念 ASP.NET常用到的js通用函数 c#代码可以做成dll来使用 ASP.NET 脚本侵入概述
web布局最实用的12条css技巧
9who · 2008-08-11 · via 博客园 - 9who

1:Rounded corners without images

效果图——

web标准设计
Rounded corners without images

<div id=”container”>
<b class=”rtop”>
<b class=”r1″></b> <b class=”r2″></b> <b class=”r3″></b> <b class=”r4″></b>
</b>
<!–content goes here –>
<b class=”rbottom”>
<b class=”r4″></b> <b class=”r3″></b> <b class=”r2″></b> <b class=”r1″></b>
</b>
</div>

.rtop, .rbottom

{display:block}
.rtop *, .rbottom *
{display: block; height: 1px; overflow: hidden}
.r1
{margin: 0 5px}
.r2
{margin: 0 3px}
.r3
{margin: 0 2px}
.r4
{margin: 0 1px; height: 2px} 

2:Style your order list

效果图——

web标准设计
Style your order list

<ol>
<li>
<p>This is line one</p>
</li>
<li>
<p>Here is line two</p>
</li>
<li>
<p>And last line</p>
</li>
</ol>

ol 

{
font
: italic 1em Georgia, Times, serif;
color
: #999999;
}
ol p 
{
font
: normal .8em Arial, Helvetica, sans-serif;
color
: #000000;
} 

3:Tableless forms

效果图——

web标准设计
Tableless forms

<form>
<label for=”name”>Name</label>
<input id=”name” name=”name”><br>
<label for=”address”>Address</label>
<input id=”address” name=”address”><br>
<label for=”city”>City</label>
<input id=”city” name=”city”><br>
</form>

label,input 

{
display
: block;
width
: 150px;
float
: left;
margin-bottom
: 10px;
}

label 

{
text-align
: right;
width
: 75px;
padding-right
: 20px;
}

br 

{
clear
: left;
} 

4:Double blockquote

效果图——

web标准设计
Double blockquote

blockquote:first-letter {
background
: url(images/open-quote.gif) no-repeat left top;
padding-left
: 18px;
font
: italic 1.4em Georgia, “Times New Roman”, Times, serif;
} 

5:Gradient text effect

效果图——

web标准设计
Double blockquote

<h1><span></span>CSS Gradient Text</h1>

h1 

{
font
: bold 330%/100% “Lucida Grande”;
position
: relative;
color
: #464646;
}
h1 span 
{
background
: url(gradient.png) repeat-x;
position
: absolute;
display
: block;
width
: 100%;
height
: 31px;
}

<!–[if lt IE 7]>
<style>
h1 span 

{
background
: none;
filter
: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’gradient.png’, sizingMethod=’scale’);
}
</style>

6:Vertical centering with line-height

效果图——

web标准设计
Vertical centering with line-height

div{
height
:100px;
}
div *
{
margin
:0;
}
div p
{
line-height
:100px;
}
<p>Content here</p> 

7:Rounded corners with images

效果图——

web标准设计
Rounded corners with images

<div class=”roundcont”>
<div class=”roundtop”>
<img src=”tl.gif” alt=”"
width=”15″ height=”15″ class=”corner”
style=”display: none” />
</div>

CONTENT

<div class=”roundbottom”>
<img src=”bl.gif” alt=”"
width=”15″ height=”15″ class=”corner”
style=”display: none” />
</div>
</div>

.roundcont 

{
width
: 250px;
background-color
: #f90;
color
: #fff;
}

.roundcont p 

{
margin
: 0 10px;
}

.roundtop 

{
background
: url(tr.gif) no-repeat top right;
}

.roundbottom 

{
background
: url(br.gif) no-repeat top right;
}

img.corner 

{
width
: 15px;
height
: 15px;
border
: none;
display
: block !important;
}

8:Multiple class name

<img src="image.gif" class="class1 class2" alt="" />

.class1 

{ border:2px solid #666; }
.class2 
{
padding
:2px;
background
:#ff0;
} 

9:Center horizontally

效果图——

web标准设计
Center horizontally

<div id=”container”></div>
#container 
{
margin
:0px auto;
} 

10:CSS Drop Caps

效果图——

web标准设计
CSS Drop Caps

<p class=”introduction”> This paragraph has the class “introduction”. If your browser supports the pseudo-class “first-letter”, the first letter will be a drop-cap. </p>

p.introduction:first-letter 

{
font-size 
: 300%;
font-weight 
: bold;
float 
: left;
width 
: 1em;
} 

11:Prevent line breaks in links, oversized content to brake

a{
white-space
:nowrap;
}

#main

{
overflow
:hidden;
}

12:Show firefox scrollbar, remove textarea scrollbar in IE

html{
overflow
:-moz-scrollbars-vertical;
}

textarea

{
overflow
:auto;
}