实例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> </head> <body> <div> <a href="http://www.baidu.com" target="fr">百度</a> <a href="goods.html" target="fr">商品表</a> <a href="http://www.hao123.com" target="fr">hao123</a> </div> <iframe src="iframe.html" name="fr" frameborder="0" width="800" height="700"></iframe> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例
实例
//css样式设置的优先级 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> #week { color: red; } .week { color: yellow; } p { color: blue; } </style> </head> <body> <p id="week" class="week">今天是周末</p> //验证id选择器,样式选择器,标签选择器优先级 <p class="week">今天是周末</p>//验证样式选择器和标签选择器优先级 <p>今天是周末</p>//标签选择器 </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例