例子
显示除其所在内容之外的一些内容:
<p>My family and I visited The Epcot center this summer. The weather was nice, and Epcot was amazing! I had a great summer together with my family!</p>
<aside>
<h4>Epcot Center</h4>
<p>Epcot is a theme park at Walt Disney World Resort featuring exciting attractions, international pavilions, award-winning fireworks and seasonal special events.</p>
</aside>
定义和用法
标签<aside>定义了它所处内容之外的一些内容。
旁边的内容应该与周围的内容间接相关。
提示:内容<aside>通常放在文档的侧边栏中。
注意:<aside>元素在浏览器中不会呈现任何特殊内容,但是,您可以使用CSS来设置<aside>元素的样式(参见下面的示例)。
浏览器支持

表中的数字指定了完全支持该元素的第一个浏览器版本。
全局属性
<aside>标签还支持HTML中的全局属性。
事件属性
<aside>标签还支持HTML中的事件属性。
更多示例
例子
使用CSS来设置<aside>元素的样式:
<html>
<head>
<style>
aside {
width: 30%;
padding-left: 15px;
margin-left: 15px;
float: right;
font-style: italic;
background-color: lightgray;
}
</style>
</head>
<body>
<h1>The aside element</h1>
<p>My family and I visited The Epcot center this summer. The weather was nice, and Epcot was amazing! I had a great summer together with my family!</p>
<aside>
<p>The Epcot center is a theme park at Walt Disney World Resort featuring exciting attractions, international pavilions, award-winning fireworks and seasonal special events.</p>
</aside>
<p>My family and I visited The Epcot center this summer. The weather was nice, and Epcot was amazing! I had a great summer together with my family!</p>
<p>My family and I visited The Epcot center this summer. The weather was nice, and Epcot was amazing! I had a great summer together with my family!</p>
</body>
</html>
615

被折叠的 条评论
为什么被折叠?



