首页
极刻
圈子
教程
开源
登录 / 注册
返回教程:CSS 教程
TRY RUN / 在线示例
CSS 教程 实例 2
CSS 教程 实例 2
源代码
运行
<html> <head> <style> body {background-color:tan;} h1 {color:maroon;font-size:20pt;} hr {color:navy;} p {font-size:11pt;margin-left:15px;} a:link {color:green;} a:visited {color:yellow;} a:hover {color:black;} a:active {color:blue;} </style> </head> <body> <h1>This is a header 1</h1> <hr> <p>You can see that the style sheet formats the text</p> <p><a href="https://www.ancii.com" target="_blank">This is a link</a></p> </body> </html>
运行结果