js ÐÞ¸ÄCSSÎļþÖеÄÑùʽ
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<style id="">
.class1{
margin-left:135px;
margin-top:1px;
}
.b{
margin-left:135px;
margin-top:1px;
}
</style>
<script>
function hidden(){
if(typeof document.styleSheets != "undefined")
{
var printStyleSheet = document.styleSheets[0];
var printRules = null;
if (typeof printStyleSheet.rules != "undefined")
{
printRules = printStyleSheet.rules;
}else{
printRules = printStyleSheet.cssRules;
}
for(var i=0; i <printRules.length; i++)
{
//alert(printRules[i]["selectorText"]);
if(printRules[i]["selectorText"]==".class1")
{
printRules[i].style.display = "none";
}
}
}
}
</script>
</HEAD>
<BODY>
<div class="class1">123446</div>
<br />
<a href="#" onclick="hidden();">CLICK ME</a>
</BODY>
</HTML>
Ïà¹ØÎĵµ£º
Ò»¡¢ÐǺÅ*
Ó¦¸ÃÊǸöͨÅä·û¡£±ÈÈç
<style type="text/css">
.roundBorder *
{
background: white;
display: block;
height: 1px;
overflow: hidden;
}
</style>
……
<b class="roundBorder">
<b class="round ......
<!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=gb2312" />
<title>CSS±ß¿òÒõÓ°< ......
ÒÔÏÂÊÕ¼¯·ÖÏíµÄÊý¾Ýͼ±íµÄչʾЧ¹û£¬ÊÇÍêÈ«ÓÃhtmlºÍcssÀ´ÊµÏֵġ£Í¨¹ý×ÐϸÑо¿Ñ§Ï°ÕâЩ°¸Àý¶ÔÓÚÎÒÃÇѧϰcss»áÓкܴó°ïÖúµÄ¡£
1¡¢ÍêȫʹÓÃdiv¡¢spanºÍcssÖÆ×÷µÄÊý¾Ýͼ±í¡£
2¡¢ÓкܶàÓô¿cssÖÆ×÷µÄÊý¾Ýͼ±í£¬ÎҸоõÕâ¸öÊÇ×öµÄ×îÆ¯ÁÁµÄÒ»¸ö¡£
3¡¢Õâ¸öÏßÐÎÊý¾Ýͼ±íÍêÈ«»ùÓÚhtmlºÍcssÖÆ×÷µÄ£¬Ã»ÓÐÓ¦ÓÃjs¡£ÕâÑùµÄͼͼ±í¼ÓÔØ¿ì£ ......
Õâ5¸öÓÐÓõÄcssÊôÐÔ¿ÉÄÜÄãÊDZȽÏÊìϤµÄ£¬µ«ÊǺÜÉÙʹÓõ½ËüÃÇ¡£ÎÒÕâÀïÌÖÂ۵IJ»ÊÇcss3µÄÐÂÊôÐÔ
¡£ÎÒÌáµ½µÄ¶¼ÊDZ»ËùÓÐä¯ÀÀÆ÷Ö§³ÖµÄcss2ÊôÐÔ±ÈÈ磺clip¡¢min-height¡¢white-space¡¢cursorºÍdisplay¡£Ç§Íò±ð´í
¹ýÕâÆªÎÄÕ£¬ÒòΪÄã»á¾ªÑȵķ¢ÏÖËûÃÇÊǺÜÓÐÓõġ£
Ò»¡¢css clip£¨²ÃÇУ©
clip²ÃÇÐÕâ¸öÊôÐÔÓеãÏñÊÇÕÚÕÖ¡£ËüÔÊÐíÄã ......
ÎÒ×î½üÔÚÄ£·Â²©¿ÍÔ°£¬ÖÆ×÷Ò»¸ö¸öÈ˲©¿Í£¬Í»È»·¢ÏÖFooter²¿·Ö¸¡¶¯µ½ÁËContent²¿·Ö£¬ÎÒÔÚFooter²¿·ÖÒѾ¼ÓÁËÒ»¾ä¡°clear:both;¡±£¬ÎªÊ²Ã´»¹»á³öÏÖÕâ¸öÎÊÌâ¡£Footer²¿·ÖµÄCSS´úÂëÈçÏ£º /*Ò³Ãæµ×²¿*/
#Footer {width:100%;height:70px;margin:0 auto;clear:both;} /*Èç¹û¼ÓÁËclear:both; ´Ë²¿·Ö¾Í²»»á¸¡¶¯ÁË*/ ......