clip:rect(上,右,下,左) 四个点坐标
<img src="1.jpg" style=" clip:rect(0,30,10,10);"/>
此方法不适合剪切背景
背景使用
style="background-image:url(bg.jpg); background-position:20px 0px;"
kground-position:
1.定位方法 left center 横向 纵向
2.切取 横向px 纵向px
不适合平铺重复 ......
scrollbar-face-color: #000000;
scrollbar-shadow-color: #FFC300;
scrollbar-highlight-color: #000000;
scrollbar-3dlight-color: #FFC300;
scrollbar-darkshadow-color: #000000;
scrollbar-track-color: #000000;
scrollbar-arrow-color: #FFC300;
如果使用Dw或者其他网页工具编写的网页,把
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
顶上的命名空间去掉。
XHTML 1.0 不支持滚动条样式表。 ......
关于CSS对各个浏览器兼容是个非常让人头疼的事情了, 网络上的教程遍地都是.今天在discuz.net上发现了一篇不错的东西,就转载过来和大家共享.可以当作CSS兼容IE6,IE7,FireFox典范了,值得去记录下。发现自己很久没有转载东西。
注:IE都能识别*;标准浏览器(如Firefox,Opera,Netscape)不能识别*;IE6能识别*,但不能识别 !important,IE7能识别*,也能识别!important;FF不能识别*,但能识别!important;
写两句代码来控制一个属性,区别Firefox与IE6:
background:orange;*background:blue;
//这一句代码写出来时,你用firefox或其它非IE浏览时,会发现,写了该代码的区域背景是橙色的,如果用IE浏览,却是蓝色的,这是因为IE都能识别*;标准浏览器(如Firefox,Opera,Netscape)不能识别*;
写两句代码来控制一个属性,区别IE7与IE6:
background:green !important;background:blue;
//这一句代码写出来时,你用IE7浏览,会发现,写了该代码的区域背景是绿色的,如果用IE6浏览,却是蓝色的,这是因为IE7能识别!
important*,一但识别了,就执行,忽略了后面的那一句,但IE6却不能识别!important,所以前面部分跳过,直接执行了后半部份。
写两句代码来控制一个属性,区 ......
首先是HTML代码:
<div id="outer">
<div id="leftFrame" style="width: 20%;">
<div style="height: 30%" id="packageListFrame" title="All Packages" >
Package list goes here
</div>
<div style="height: 70%" id="packageFrame" title="All classes and interfaces (except non-static nested types)" >
Class list goes here
</div>
</div>
<div style="width: 80%;" id="classFrame" title="Package, class and interface descriptions">
Summary details go here
</div>
</div>
添加如下样式:
<style type="text/css">
#outer { position: relative; }
#leftFrame {
position: fixed;
height: 100%;
width: 20%;
top: 0;
}
#classFrame {
position: absolute;
left: 21%;
width: 77%;
}
#packageListFrame{
......
让left的高度等于 center的高度..........
<div id=left></div>
<div id=center></div>
<script type="text/javascript">
document.getElementById("left").style.height = document.getElementById("center").offsetHeight + "px";
</script> ......
1 导入外部js文件:
1.<script type="text/javascript" src="myjs/xx.js"></script>
2.<script language="javascript" src="myjs/xx.js"></script>
2 导入外部css文件:
<link rel="stylesheet" type="text/css" href="/css/mycss.css"/>
rel、stylesheet属性作用:首先,link标签是用于当前文档引用外部文档的,其次,这个标签的rel属性用于设置对象和链接目的间的关系,说白了就是指明你链进来的对象是个什么东西的.
......