写一案例,要求用到<a href="" target="">与<iframe>理解target忏悔与name属性之间的关联是如何实现的
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> </head> <body> <ul style="float: top;"> <li><a href="http://www.baidu.com" target="xs">百度</a></li> <li><a href="http://www.163.com" target="xs">163</a></li> </ul> <iframe srcdoc="<h3>显示区</h3>" frameborder="bottom" width="500" height="800" style="float:left" name="xs"></iframe> </body> </html>
点击 "运行实例" 按钮查看在线实例
2.写一个案例, 演示css中的内联样式,内部样式,外部样式的应用场景,理解style属性, style标签, 以及外部样式表的使用方式
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>css三种样式</title>
<link rel="stylesheet" href="css/style1.css"><!--外联样式-->
<style>/*内部样式*/
#php01 {
color: red;
}
/*标签选择器*/
p {
color: green;
}
/*类选择器*/
.php02 {
color: blue;
}
</style>
</head>
<body>
<p style=color:#1201ff>内联样式</p>
<p id="php01">我爱你php</p>
<p class="php02">我爱你php</p>
<p>我爱你php</p>
<p></p>
</body>
</html>点击 "运行实例" 按钮查看在线实例
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号