国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發(fā) > CSS > 正文

網(wǎng)頁設計技巧代碼:HTML代碼、CSS代碼和javascript代碼

2024-07-11 09:01:55
字體:
供稿:網(wǎng)友

武林網(wǎng)(www.survivalescaperooms.com)文章簡介:網(wǎng)頁設計技巧代碼:HTML代碼、CSS代碼和javascript代碼.

細節(jié)1………………………………………………………………………………

一、當文字與圖片在一行,需要將文字與圖片底對齊,需要這樣寫:

<li>記住密碼<img src="" align="bottom" style="margin-bottom:-4px"/></li>

二、當文字與圖片在一行,需要將文字與圖片居中對齊,需要這樣寫:

<li>記住密碼<img src="static/img/xyx.jpg" align="middle"/></li>

三、更改IE“查看源代碼”菜單打開的編輯器

打開注冊表編輯器,在開始-運行中輸入regedit
找到以下位置: HKEY_LOCAL_MACHINE"SOFTWARE"Microsoft"Internet Explorer"View SourceEditor"Editor Name"修改默認的數(shù)據(jù)為"D:"Program Files"EmEditor"EmEditor.exe"
切換到IE中查看源代碼就可以看到效果了。
如果View Source Editor"Editor Name項沒有,可以自己新建。

四、自動最大化窗口,在 <body> 與 </body> 之間加入:

<SCRIPT language="javascript">
setTimeout('top.moveTo(0,0)',5000);
setTimeout('top.resizeTo(screen.availWidth,screen.availHeight)',5000);
</script>

五、window.opener 實際上就是用window.open打開的窗體的父窗體。

比如在父窗體parentForm里面 通過 window.open("subForm.html"),那么在subform.html中 window.opener

就代表parentForm,可以通過這種方式設置父窗體的值或者調(diào)用js方法。

1,window.opener.test(); ---調(diào)用父窗體中的test()方法;

2,如果window.opener存在,設置parentForm中stockBox的值。

if (window.opener && !window.opener.closed)

{

window.opener.document.parentForm.stockBox.value = symbol;

}

六、刷新頁面的方法

Javascript刷新頁面的方法:
1 history.go(0)
2 location.reload()
3 location=location
4 location.assign(location)
5 document.execCommand('Refresh')
6 window.navigate(location)
7 location.replace(location)
8 document.URL=location.href


自動刷新頁面的方法:
1.頁面自動刷新:把<meta http-equiv="refresh" content="20">加入<head>區(qū)域中

2.頁面自動跳轉(zhuǎn):把<meta http-equiv="refresh" content="20;url=http://www.webjx.com">加入<head>區(qū)域中

3.js自動刷新頁面
<script language="JavaScript">
function myrefresh()
{
window.location.reload();
}
setTimeout('myrefresh()',1000); //指定1秒刷新一次
</script>

4.JS刷新框架

a)刷新包含該框架的頁面用
<script language=JavaScript>
parent.location.reload();
</script>

b)子窗口刷新父窗口
<script language=JavaScript>
self.opener.location.reload();
</script>
( 或 <a href="javascript:opener.location.reload()">刷新</a> )

c)刷新另一個框架的頁面
<script language=JavaScript>
parent.另一FrameID.location.reload();
</script>

七、用過CSS hack應該知道,用下劃線命名是一種hack,如使用“_style”這樣的命名,可以讓IE外的大部分瀏覽器忽略這個樣式的定義,所以使用“_”做為命名時的分隔符是不規(guī)范的。在做CSS檢查時會出現(xiàn)錯誤提示。

八、IE條件注釋寫法

<!--[if !IE]>除IE外都可識別<![endif]-->
<!--[if IE]> 所有的IE可識別 <![endif]-->
<!--[if IE 5.0]> 只有IE5.0可以識別 <![endif]-->

九、CSS HACK 寫法

第一種:
.div {
background:orange;
*background:green !important;
*background:blue;
}
第二種:
.div {
margin:10px;
*margin:15px;
_margin:15px;
}
第三種:
#div { color: #333; }
*+html #div { color: #999; }
* html #div { color: #666; }


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 台山市| 晴隆县| 游戏| 临颍县| 武冈市| 固安县| 沙田区| 雷州市| 都匀市| 石林| 称多县| 玛纳斯县| 莱西市| 浦北县| 宝鸡市| 凤翔县| 东方市| 鱼台县| 武鸣县| 惠安县| 衡水市| 合江县| 安康市| 枣庄市| 桂东县| 泾川县| 济南市| 禹州市| 景洪市| 关岭| 宝坻区| 丹阳市| 会同县| 龙山县| 赤峰市| 铁岭市| 秭归县| 玛沁县| 昌黎县| 昌黎县| 平凉市|