CSS样式继承性

时间:2019-12-01 09:31:52   收藏:0   阅读:115
原文:CSS样式继承性

CSS样式继承介绍#

CSS样式继承实践#

Copy
<!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>继承性</title> <style> body{ color: red; } </style> </head> <body> <div> <h2>微笑是最初的信仰</h2> <p>微笑是最初的信仰</p> </div> </body> </html>

技术图片

Copy
<!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>继承性</title> <style> body{ color: red; font-size: 18px; } div{ color: springgreen; } </style> </head> <body> <div> <h2>微笑是最初的信仰</h2> <p>微笑是最初的信仰</p> </div> </body> </html>

技术图片

Copy
<!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>继承性</title> <style> body{ color: red; font-size: 18px; } div{ color: springgreen; border: 1px solid red; } </style> </head> <body> <div> <h2>微笑是最初的信仰</h2> <p>微笑是最初的信仰</p> </div> </body> </html>

技术图片

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!