最近正在看《CSS实战手册》这本书,发现第五章管理多种样式中的样式优先级公式挺实用的。   有时候我们给同样一个属性用多种方式去定义样式,来自最具体的样式的属性会胜出,但不知道到底哪种样式最具体,好在css还提供了一个公式,他根据指派给样式选择器的值决定样式的特性——标签选择器、类选择器、ID选择器,等等。这个系统是这样进行的:   1.一个标签选择器值1分。   2.一个类选择器值10。   3.一个ID选择器值100分。   4.一个行内样式 ...
2008-03-27

用js给input传值

关键字: javascript jquery input 传值
<style> #name{ float:left; height:25px;*height:24px;margin-right:10px;} #btn{ cursor:pointer; background:#a5a5a5; border:1px solid #666666;padding:1px 3px 3px 3px;float:left;} #box{ border:1px solid #a5a5a5; background:#a5a5a5; width:144px; color:#000;*margin-top:-15px;*width:146px;} #box ...
...
...
...
这个项目还没上线,估计过一阵子就能在线看了,先把地址告诉大家:http://brookshire.eprize.net/recipecontest/
2008-03-16

用css写出三角形

关键字: css 三角形
<!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> <title>三角形的写法</title> <meta http-equiv="Content-Type&qu ...
2008-03-16

常用js语句——大全

关键字: javascript 大全
1.document.write(""); 输出语句 2.JS中的注释为// 3.传统的HTML文档顺序是: document->html->(head,body) 4.一个浏览器窗口中的DOM顺序是: window->(navigator,screen,history,location,document) 5.得到表单中元素的名称和值: document.getElementById("表单中元素的ID号").name(或value) 6.一个小写转大写的JS: document.getElementById("output ...
2008-03-16

FF、IE7、IE6的CSS问题

关键字: 浏览器 *+html *html important hack min-height
1. !important随着IE7对!important的支持,现在IE7和FF都支持!important,可以用!important来区分FF、IE7和IE6的高度。用法如下:<style rel="stylesheet" type="text/css"> <!-- .content{background:#a5a5a5;height:100px !important;}/* Moz+IE7 */ .content{background:#a5a5a5;height:200px;}/* IE6 */ --> < ...
2008-03-16

w3c标准中object标签取代ifame标签

关键字: xhtml w3c object iframe
在xhtml 中引入外部文件往往使用<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" width="100%" height="100%" src="data.html"></iframe>在xhtml中w3c 判定为不推荐使用ifame标签,推荐改用 object 标签,可以这样使用<object data=" ...
2008-03-06

用javascript来充实文档的内容

关键字: javascript 充实文档的内容
<!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" xml:lang="en"> <head> <meta http-equiv="Content-Type" content ...
2008-03-04

javascript美术馆改进版

关键字: javascript 美术馆 改进版
<!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" xml:lang="en"> <head> <meta http-equiv="Content-Type" content ...
ice-cream
搜索本博客
我的相册
存档
最新评论