如何使HTML中的水平线(<;hr>;)跨越所有页面宽度
我有下面的HTML如何使HTML中的水平线(<;hr>;)跨越所有页面宽度,html,web,Html,Web,我有下面的HTML <!DOCTYPE html> <html> <body> <h1>My Great Web</h1> <FONT SIZE = "5"> <ol> <li> Foo. </li> <li> Bar. </li>
<!DOCTYPE html>
<html>
<body>
<h1>My Great Web</h1>
<FONT SIZE = "5">
<ol>
<li> Foo. </li>
<li> Bar. </li>
<ol>
</FONT>
<br>
<hr style="width: 100%"/>
</body>
</html>
我的大网
福李>
酒吧李>
这就产生了下图。
请注意,水平线没有完全向左延伸。我该怎么做?您必须关闭
<ol>
<li> Foo. </li>
<li> Bar. </li>
</ol>
福李>
酒吧李>
您必须关闭您的
<ol>
<li> Foo. </li>
<li> Bar. </li>
</ol>
福李>
酒吧李>
HTML5不支持字体标记。改用CSS。
HTML 4.01中不推荐使用字体元素
它可能在某些浏览器上显示不好
<html>
<body>
<h1>My Great Web</h1>
<div style="font-size:12px;">
<ol>
<li> Foo. </li>
<li> Bar. </li>
</ol>
</div>
<br>
<hr/>
</body>
</html>
我的大网
福李>
酒吧李>
HTML5不支持字体标记。改用CSS。
HTML 4.01中不推荐使用字体元素
它可能在某些浏览器上显示不好
<html>
<body>
<h1>My Great Web</h1>
<div style="font-size:12px;">
<ol>
<li> Foo. </li>
<li> Bar. </li>
</ol>
</div>
<br>
<hr/>
</body>
</html>
我的大网
福李>
酒吧李>
执行以下操作:
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 0 ;
padding: 0;
font-size: 14px;
}
.container {
width: 80%;
margin: 0 auto;
}
</style>
</head>
<body>
<div class="container">
<h1>My Great Web</h1>
<div class="list">
<ol>
<li> Foo. </li>
<li> Bar. </li>
<ol>
</div>
<br />
</div>
<hr />
</body>
</html>
身体{
保证金:0;
填充:0;
字体大小:14px;
}
.集装箱{
宽度:80%;
保证金:0自动;
}
我的大网
福李>
酒吧李>
执行以下操作:
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 0 ;
padding: 0;
font-size: 14px;
}
.container {
width: 80%;
margin: 0 auto;
}
</style>
</head>
<body>
<div class="container">
<h1>My Great Web</h1>
<div class="list">
<ol>
<li> Foo. </li>
<li> Bar. </li>
<ol>
</div>
<br />
</div>
<hr />
</body>
</html>
身体{
保证金:0;
填充:0;
字体大小:14px;
}
.集装箱{
宽度:80%;
保证金:0自动;
}
我的大网
福李>
酒吧李>
关闭您的
=>
关闭您的
注意
在末尾关闭
注意
在末尾关闭