HTML DOM content 属性
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                HTML DOM content 属性
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                摘自:http://www.w3school.com.cn/htmldom/prop_style_content.asp
定義和用法
content 屬性設置文本或圖像出現(浮動)在另一個元素中的什么地方。
語法:
Object.style.content=value可能的值
| string | 定義文本內容。 | 
| url | 定義 url。 | 
 
  | ? | 
| 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" οnclick="setFloatLeft()" value="Set image to float left" /> </form></body> </html>TIY
設置圖像浮動于文字的左邊HTML DOM Style 對象參考手冊
?
?
轉載于:https://www.cnblogs.com/KeenLeung/archive/2013/03/08/2950838.html
總結
以上是生活随笔為你收集整理的HTML DOM content 属性的全部內容,希望文章能夠幫你解決所遇到的問題。
                            
                        - 上一篇: IOUtils快速进行内容复制与常用方法
 - 下一篇: java中finalizer终结方法学习