来源:Python爬虫开发与项目实战,没有链接记录下
html中css的样式:
1、内联样式:
<body style="background-color: green;margin: 0;padding: 0;"></body>
2、嵌入式样式:
<head> <meta charset="UTF-8"> <title>Python</title> <style type="text/css"></style> </head>
3、外部样式:
<head> <meta charset="UTF-8"> <title>Python</title> <link rel="stylesheet" type="text/css" href="style.css"> </head>
html标记定义:p{属性:属性值;属性1:属性值1},p叫做选择器
ID选择器定义:#word{text-align:center;color:red;}
class选择器定义:.center{text-align:center;}或者p.center{text-align:center;}
css常见属性:
1、颜色:color:green
或者c