用CSS实现HTML元件的绝对定位
示例:此DIV为固定定位对象
要使HTML元件定位于浏览器的某个固定位置,而不随滚动条滚动,用以下CSS代码即可,跨各个主流浏览器: POSITION: fixed! important; TOP: 100px; _position: absolute; _top: 40; _left: 100。
示例见右边黄底红字块。
相关文档:
<!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="text/html; charset=utf-8" />
<title>JS+CSS相册展示&l ......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>use html as DOM</title>
<mce:script language="javascript" type="text/javascript"><!--
function addUser() {
// get and execute na ......
/***************************by
garcon1986********************************/
感谢CSDN的shan1119 帮我解决Javascript部分的错误。
<mce:script language="JavaScript"><!--
function toggle(id,id2,id3) {
var state = document.getElementById(id).style.display;
if (state == 'block') {
......
css学习
1。一个类以.开头。例:.bigtext
2。一个ID以#开头。例:#header
3。定义一个层。例:#header {position: absolute; left: 32; top: 20}
在html中,<div id="header"> <img src="abc.gif"> </div>
div必须给出id。
4。overflow。检索或设置当对象的内容超过其指 ......