html代码style图片width,HTML Style columnWidth用法及代码示例
DOM中的columnWidth屬性用于指定列的寬度。
用法:
返回columnWidth屬性:
object.style.columnWidth
設置columnWidth屬性:
object.style.columnWidth = "auto | length | initial | inherit"
屬性值:
auto:缺省值。列寬將由瀏覽器確定
length:指定列寬度的長度
initial:將此屬性設置為其默認值。閱讀有關初始
inherit:從其父元素繼承此屬性。了解有關繼承的信息
例:
GeeksforGeeks
Style columnWidth Property
Click
HTML stands for Hyper Text Markup Language.
It is used to design web pages using markup language.
HTML is the combination of Hypertext and
Markup language. Hypertext defines the link
between the web pages. Markup language is used
to define the text document within tag which
defines the structure of web pages. HTML is
a markup language which is used by the browser
to manipulate text, images and other content
to display it in required format.
function GFGFun() {
//Chrome, Safari, Opera
document.getElementById("DIVid").style.WebkitColumnWidth="50px";
// Firefox
document.getElementById("DIVid").style.MozColumnWidth="50px";
document.getElementById("DIVid").style.columnWidth="50px";
}
輸出:
之前:
后:
支持的瀏覽器:下面列出了HTML DOM樣式columnWidth屬性支持的瀏覽器:
谷歌瀏覽器
IE瀏覽器
Firefox MozColumnWidth
蘋果Safari
Opera
總結
以上是生活随笔為你收集整理的html代码style图片width,HTML Style columnWidth用法及代码示例的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux使用ping命令ping本机,
- 下一篇: python安装找不到硬盘_python