您現(xiàn)在的位置是:網(wǎng)站首頁(yè) >> 代碼素材
聯(lián) 系 人:李總
聯(lián)系電話:13759574266
在線 QQ:89417157
郵箱:13759574266@qq.com
微信號(hào):ynlongtou
地址:昆明市滇緬大道旁昆建路5號(hào)108智庫(kù)空間A座4樓
設(shè)置網(wǎng)頁(yè)距離頂部和左右為無(wú)間隙:body{margin: 0px; padding: 0px;}
設(shè)置ul和li無(wú)任何樣式:ul{list-style: none;} li{list-style: none;} ol{list-style: none;}
設(shè)置圖片無(wú)邊框:img{border:0}
按鈕或表單框去樣式:input{outline:none;}
去掉搜索等框線:input,textarea,select,button{font-family:inherit; font-size:inherit; font-weight:inherit; outline-style:none; outline-width:0pt; resize:none; padding: 0; margin: 0;}
設(shè)置背景圖片:{BACKGROUND: url(/images/bg.jpg); }
設(shè)置背景顏色:{background-color:#ffffff; }
給樣式加邊框和顏色及設(shè)置圓角.ys{width:100px; border:#999999 1px solid; border-radius:5px 5px 5px 5px;}
給td四周加線條:<td bgcolor="#ddcdb3" style="BORDER-left: #b39d7a 1px solid; BORDER-right: #b39d7a 1px solid; BORDER-top: #b39d7a 1px solid; BORDER-bottom: #b39d7a 1px solid;">
設(shè)置某個(gè)圖片樣式有邊框:.divcss5 img{border:1px solid #F00 }
設(shè)置表邊框?yàn)樘摼樣式一:.xtys{border:1px dashed #000; width:350px; height:50px;}
設(shè)置邊框?yàn)樘摼樣式二:.xxys{border:dotted 1px #c7c7c7;}或某一邊{border-right: dotted 1px #c7c7c7;}
設(shè)置字體、大小和顏色及居中:.ys{font-family:"微軟雅黑"; font-size:18px; color:#ff0000; text-align: center; }
單獨(dú)給字體加顏色:<font color="#FF0000">我是紅色字體</font>
設(shè)置div居中:.jz{margin:0 auto;}或<center><div></div></center>
asp注釋代碼:<!--需要被注釋的內(nèi)容-->
asp獲取當(dāng)前日期并加三天后的時(shí)間:<%=Date()+3%>
css樣式中的注釋代碼:/*需要被注釋的內(nèi)容*/
背景圖片拉伸效果:<img border='0' src='images/bg.jpg' width='100%' height='100%' style='position: absolute;left:0px;top:0px;z-index: -1'>
瀏覽器兼容模式代碼:
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="x-ua-compatible" content="IE=7" >
兼容IE7:<meta http-equiv="X-UA-Compatible" content="IE=7" />
進(jìn)入網(wǎng)站自動(dòng)跳轉(zhuǎn):<meta http-equiv="refresh" content="0;url= /m ">
給網(wǎng)站加favicon.ico圖標(biāo):
<head>
<link rel="shortcut icon" href="/favicon.ico"/>
<link rel="bookmark" href="/favicon.ico"/>
</head>
asp調(diào)用當(dāng)前日期時(shí)間方法一:
<%
response.write formatdatetime(now,0)&"<br>"
response.write formatdatetime(now,1)&"<br>"
response.write formatdatetime(now,2)&"<br>"
response.write formatdatetime(now,3)&"<br>"
response.write formatdatetime(now,4)&"<br>"
%>
方法二:<%=now()%>
打開(kāi)網(wǎng)頁(yè)4秒后彈出窗口
<script type='text/javascript'>
setTimeout(function(){alert('這里是彈出的內(nèi)容')},4000);//界面加載四秒后執(zhí)行彈出窗口的方法。
</script>
網(wǎng)頁(yè)禁止右鍵:<meta http-equiv="MSThemeCompatible" content="Yes">
禁止左鍵:<body onselectstart="return false">
禁止右鍵:<body oncontextmenu=self.event.returnvalue=false>
結(jié)合起來(lái)禁止左右鍵:<body oncontextmenu=self.event.returnvalue=false onselectstart="return false">
給表格加邊框:
設(shè)置樣式
<style>
.table-c table{border-right:1px solid #c6c6c6; border-bottom:1px solid #c6c6c6}
.table-c table td{border-left:1px solid #c6c6c6; border-top:1px solid #c6c6c6; line-height:30px; text-indent:10px;}
</style>
源代碼片段
<div class="table-c">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="180">云南龍頭科技</td>
<td width="110">專業(yè)建站</td>
<td width="110">軟件開(kāi)發(fā)</td>
</tr>
<tr>
<td>www.www.charti.com.cn</td>
<td>商城建設(shè)</td>
<td>系統(tǒng)開(kāi)發(fā)</td>
</tr>
</table>
</div>
li里面不換行
white-space:nowrap; //強(qiáng)制不換行
overflow:hidden; //自動(dòng)隱藏文字
text-overflow: ellipsis; //文字隱藏后添加省略號(hào)
-o-text-overflow:ellipsis; //適用于opera瀏覽器
/*當(dāng)屏幕小于640px的時(shí)候顯示的樣式*/
@media only screen and (max-width:640px){
.w{ width:320px;}/*這里是css的樣式*/
}
white-space:nowrap;不換行樣式
.ys{height:25px;line-height:25px;font-size:12px;width:120px;overflow:hidden;}/*內(nèi)容溢出120px時(shí)將自動(dòng)隱藏;*/
<a>標(biāo)簽中的href="javascript:;"是什么意思?
例子:<a href="javascript:;">云南龍頭科技</a>
javascript:是一個(gè)偽協(xié)議
javascript:是表示在觸發(fā)<a>默認(rèn)動(dòng)作時(shí),執(zhí)行一段JavaScript代碼,而 javascript:; 表示什么都不執(zhí)行,這樣點(diǎn)擊<a>時(shí)就沒(méi)有任何反應(yīng)。
href="javascript:;"就是去掉a標(biāo)簽的默認(rèn)行為,跟href="javascript:void(0)"是一樣的?
void 是JavaScript 的一個(gè)運(yùn)算符,void(0)就是什么都不做的意思。
更多云南龍頭科技有限公司網(wǎng)站案例請(qǐng)查看:http://www.www.charti.com.cn/case.asp?id=3
云南龍頭科技有限公司憑借多年的網(wǎng)站建設(shè)經(jīng)驗(yàn),堅(jiān)持以“幫助中小企業(yè)實(shí)現(xiàn)網(wǎng)絡(luò)營(yíng)銷(xiāo)化”為宗旨,成功幫助多家中小企業(yè)實(shí)現(xiàn)互聯(lián)網(wǎng)信息化建設(shè),得到了客戶的一致好評(píng)。如你有任何關(guān)于網(wǎng)站建設(shè)的疑問(wèn),請(qǐng)立即點(diǎn)擊咨詢?cè)颇淆堫^科技有限公司資深營(yíng)銷(xiāo)專家或撥打咨詢熱線:13759574266,我們會(huì)詳細(xì)為你一一解答你心中的疑難。

掃描關(guān)注官方微信