HTML DOM content ÊôÐÔ

HTML DOM Style ¶ÔÏó

¶¨ÒåºÍÓ÷¨

content ÊôÐÔÉèÖÃÎı¾»òͼÏñ³öÏÖ£¨¸¡¶¯£©ÔÚÁíÒ»¸öÔªËØÖеÄʲôµØ·½¡£

Óï·¨£º

Object.style.content=value

¿ÉÄܵÄÖµ

Öµ ÃèÊö
string ¶¨ÒåÎı¾ÄÚÈÝ¡£
url ¶¨Òå url¡£
  • counter(name)
  • counter(name, list-style-type)
  • counters(name, string)
  • counters(name, string, list-style-type)
 
attr(X) ¶¨ÒåÏÔʾÔÚ¸ÃÑ¡ÔñÆ÷֮ǰ»òÖ®ºóµÄÑ¡ÔñÆ÷µÄÊôÐÔ¡£
open-quote  
close-quote  
no-open-quote  
no-close-quote  

ÌáʾºÍ×¢ÊÍ

×¢ÊÍ£ºÈç¹ûÔÚÒ»ÐÐÖжÔÓÚ¸¡¶¯ÔªËضøÑÔ¿Õ¼äÌ«ÉÙ£¬ÔòÕâ¸öÔªËØ»áÌøµ½ÏÂÒ»ÐУ¬Õâ¸ö¹ý³Ì»á³ÖÐøµ½ÓÐ×ã¹»¿Õ¼äµÄÒ»ÐÐΪֹ¡£

×¢ÊÍ£ºÐÐÄÚÔªËØµÄÄÚÈÝ¡¢±³¾°ºÍ±ß¿òÓ¦¸Ã³öÏÖÔÚ¸¡¶¯ÔªËØÖ®Ç°¡£¿é¼¶ÔªËصı³¾°ºÍ±ß¿òÓ¦µ±³öÏÖÔÚ¸¡¶¯ÔªËØÖ®ºó£¬µ«ÊÇ¿é¼¶ÔªËØµÄÄÚÈÝÓ¦µ±ÔÚ¸¡¶¯ÔªËصÄÇ°Ãæ¡£

ʵÀý

±¾ÀýÉèÖÃͼÏñ¸¡¶¯ÓÚ×ó±ß£º

<html>
<head>
<script type="text/javascript">
function setFloatLeft()
{
document.getElementById("img1").style.cssFloat="left";
}
</script>

</head>
<body>

<img id="img1" src="logocss.gif" width="95" height="84" />

<p>This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.</p>

<form>
<input type="button" onclick="setFloatLeft()" value="Set image to float left" />
</form>

</body>
</html>

HTML DOM Style ¶ÔÏó

VUE