發(fā)布一個以前學(xué)習(xí)html時(shí)候的總結(jié)

2023-05-09    分類: 網(wǎng)站建設(shè)

以下是以前學(xué)習(xí)html時(shí)候總結(jié)的一些短語和方法,包括一些html使用技巧,希望大家認(rèn)真閱讀后有所幫助。













a:link {font-size:12px;color:red;text-decoration:none;font-style:italic}
a:link {font-size:14px;color:red;font-weight:normal;text-decoration:underline;font-style:normal}
a:link {font-size:12px;font-family:華文行楷;font-weight:bolder;color:red;text-decoration:overline}
style="writing-mode:tb-rl"
style="writing-mode:lr-tb"



調(diào)用css
favicon






text-decoration:none
text-decoration:overline
text-decoration:underline
text-underline-position:above/below(IE專有屬性)
text-decoration:line-through
text-transform:uppercase/lowercase/capitalize
font-size:大小
font-family:字體
font-style:normal/italic
font-weight:normal/bold/bolder/lighter
line-height:120%
writing-mode:tb-rl/lr-tb
text-indent:?px
綜合 font:樣式 變形 加粗 字號/行高 字體
example----font:italic bold 12px/120% 華文行楷

定義 調(diào)用

.css1 {} class=css1
#css2 {} id=css2
table {} 說明table 中的所有屬性
table#css1 {} table中的所有css1都有這個屬性 id=css1
table.css1 {} table中的所有css1都有這個屬性 class=css1
body,table,input {} table和body和input都有這個屬性
table #css1 table中其他標(biāo)簽擁有的屬性 ...table .css1 table中其他標(biāo)簽擁有的屬性
...
image:
vaspace hspace width heigth dynsrc src lowsrc alt

form :
input type="text/password/radio/checkbox/sunmit/file/hidden/botton"
select option
textarea
onmouseover="this.focus() onfocus=this.select()"
onmouseover="this.value=''"

font:
i b u strike < > & "' ® ©

在網(wǎng)頁中加入html代碼只要在代碼前后加入:就可以了

size color

basefont color:red;... base href="" base target="_top"

table td tr:
align=center/right/left leftmargin topmargin cursor oncontentmenu
ondragstart oncopy oncut onpaste onselectstart bgcolor background
width heigth id cellpadding cellspacing border

bgsound:
loop=-1/infinite balance volume autostart

marquee:
direction:up/down/left/right
align:center/right/left/right
behavior:scroll slide alternate
vspace hspace height width bgcolor
scrolldelay scrollamount

你好


favicon

oncontextmenu="return false"
ondraystart="return false"
onselectstart="return false"
oncopy="return false"
onpaste="return false"
oncut="return false"


取消表單按下時(shí)的虛線
你好
你不好

加入收藏:



a的全寫:anchor

防止點(diǎn)擊鏈接時(shí)新窗口都是在頂部打開



多一行

如何讓網(wǎng)頁中的廣告自動關(guān)閉:
---在網(wǎng)頁廣告條的網(wǎng)頁head和/head中加入:

或者:
function close(){
self.close()
}
setinterval("close()",5000)


frameset frame iframe:
border bordercolor src name rows cols framespacing frameborder

flash透明:


半透明的表格:

 


陰影表格:

 


特色的表單:









背景更換效果

sage


關(guān)閉網(wǎng)頁

調(diào)用:


鼠標(biāo)指向時(shí)變背景顏色的表格


細(xì)線表格1:


細(xì)線表格2:


細(xì)線表格3:



凹下的立體表格:




    
    
    


凸出的立體表格:




    
    
    


有間距的表格:


  


IE地址欄前換成自己的圖標(biāo)

可以在收藏夾中顯示出你的圖標(biāo)

關(guān)閉中文輸入法

防止別人frame你的網(wǎng)頁:


1. oncontextmenu="window.event.returnValue=false" 將徹底屏蔽鼠標(biāo)右鍵
no
可用于Table

2. 取消選取、防止復(fù)制

3. onpaste="return false" 不準(zhǔn)粘貼

4. oncopy="return false;" oncut="return false;" 防止復(fù)制

5. IE地址欄前換成自己的圖標(biāo)

6. 可以在收藏夾中顯示出你的圖標(biāo)

7. 關(guān)閉輸入法

8. 永遠(yuǎn)都會帶著框架



9. 防止被人frame



10. 網(wǎng)頁將不能被另存為



11. onclick="window.location = 'view-source:'+ 'http://www.webjx.com/'">

12.刪除時(shí)確認(rèn)

刪除

13. 取得控件的絕對位置

//Javascript


//VBScript


14. 光標(biāo)是停在文本框文字的后




15. 判斷上一頁的來源

javascript:document.referrer

16. 小化、大化、關(guān)閉窗口











本例適用于IE

17.屏蔽功能鍵Shift,Alt,Ctrl



18. 網(wǎng)頁不會被緩存




或者

19.怎樣讓表單沒有凹凸感?





20.
&的區(qū)別?

(division)用來定義大段的頁面元素,會產(chǎn)生轉(zhuǎn)行
用來定義同一行內(nèi)的元素,跟
的唯一區(qū)別是不產(chǎn)生轉(zhuǎn)行
是ns的標(biāo)記,ie不支持,相當(dāng)于


21.讓彈出窗口總是在后面:



22.不要滾動條?

讓豎條沒有:


讓橫條沒有:


兩個都去掉?更簡單了



23.怎樣去掉圖片鏈接點(diǎn)擊后,圖片周圍的虛線?



24.電子郵件處理提交表單





25.在打開的子窗口刷新父窗口的代碼里如何寫?

window.opener.location.reload()

26.如何設(shè)定打開頁面的大小


打開頁面的位置

27.在頁面中如何加入不是滿鋪的背景圖片,拉動頁面時(shí)背景圖不動



28. 檢查一段字符串是否全由數(shù)字組成



29. 獲得一個窗口的大小

document.body.clientWidth; document.body.clientHeight

30. 怎么判斷是否是字符

if (/[^/x00-/xff]/g.test(s)) alert("含有漢字");
else alert("全是字符");

31.TEXTAREA自適應(yīng)文字行數(shù)的多少



32. 日期減去天數(shù)等于第二個日期



33. 選擇了哪一個Radio


Style
Barcode



34.腳本永不出錯



35.ENTER鍵可以讓光標(biāo)移到下一個輸入框

本文標(biāo)題:發(fā)布一個以前學(xué)習(xí)html時(shí)候的總結(jié)
文章出自:http://www.muchs.cn/news/258665.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供標(biāo)簽優(yōu)化、微信小程序、動態(tài)網(wǎng)站、域名注冊、品牌網(wǎng)站制作、企業(yè)建站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)