批改状态:合格
老师批语:并非所有网站都允许在iframe标签中打开, 你试过了, 有的是打不开的
iframe标签案例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>内联框架标签</title> </head> <body> <h3>看片平台</h3> <ul style="float: left"> <li><a href="https://www.iqiyi.com/" target="main">爱奇艺</a></li> <li><a href="https://www.youku.com/" target="main">优酷</a></li> <li><a href="http://www.baofeng.com/" target="main">暴风</a></li> <li><a href="https://v.qq.com/" target="main">腾讯视频</a></li> </ul> <iframe srcdoc="测试" name="main" width="300px" height="500"></iframe> </body> </html>
点击 "运行实例" 按钮查看在线实例
css优先级demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="style/style.css">
<title>Title</title>
<style>
/*内联样式*/
span{
color: red;
}
</style>
</head>
<body>
<h1>css优先级设置</h1>
<span style="color: blue;">html小白成功之路</span>
</body>
</html>点击 "运行实例" 按钮查看在线实例
css选择器的使用案例
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>css选择器的使用</title>
<style>
p {
color: red;
}
.test{
color: blue;
}
#main{
color: green;
}
</style>
</head>
<body>
<p id="main" class="test">id选择器的优先级是除了js之外最高的</p>
<p>class选择高于标签选择器</p>
<p>标签选择器的级别是最低的</p>
</body>
</html>点击 "运行实例" 按钮查看在线实例
盒子模型
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>盒子模型</title>
<style>
.box{
width: 300px;
height: 300px;
background-color: red;
padding: 30px 30px;
}
.box2{
height: inherit;
background-color: blue;
}
</style>
</head>
<body>
<div class="box">
<div class="box2"></div>
</div>
</body>
</html>点击 "运行实例" 按钮查看在线实例
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号