网页中常见CSS Hack的使用整理
_property:value
属性前加_线,该hack对IE有效,在FF下无效
这段代码在IE下看,div的边框为蓝色,而在FireFox下无效
<style type="text/css">
.tx_border{_border:1px solid #333333;}/*这个在IE下可以看到边框为灰色,而在FF下是没有任何的效果*/
</style>
选择符 {width:IE5.x宽度; voice-family :"\"}\""; voice-family:inherit; width:正确宽度;}
IE5.5及以下版本不认,其它版本与FF都认
如下,该段代码在FF与IE6/IE7能正确显示div宽度为200px
<style type="text/css">
#tx_width{voice-family :"\"}\"";
voice-family:inherit;
width:200px;
}
</style>
被应用了!important;的属性将在IE中无效,对FF有效。
<style type="text/css">
#div1
{
background:red !important;
background:blue;
}
</style>
相关文档:
css的dl dt dd的应用:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content= ......
按钮样式*/
.ButtonCss {}{
font-family: "Tahoma", "宋体";
font-size:9pt; color: #003399;
border: 1px #003399 solid;
color:006699;
BORDER-BOTTOM: #93bee2 1px solid;
BORDER-LEFT: #9 ......
由于各浏览器的默认CSS样式不一样,我们必须写一个CSS Reset统一起来。
通常我的做法是在common.css里写全局控制,这里面也包括header和footer,其它CSS文件就通过@import url(”
common.css”);引用。
body{padding:10px;margin:0;background:#fff;font-size:12px;line-height:14px;color:#333;font-
family ......
嵌入式SGF查看和编辑器
EidoGo Player
(SGF viewer and editor) 是一款开源(AGPLv3
许可)纯javascript+css编写、在浏览器内运行的围棋打谱、编辑软件。
可嵌入到任何页面,提供打谱、编辑SGF棋谱。
源代码:http://code.google.com/p/eidogo/
例子:第24届天元战本赛第1轮 2010-01-27 常昊vs罗洗河 白中盘胜
(
......