solid 固体的;坚硬的;无空隙的;非中空的;实心的;结实的
border 国界;边界;边疆,设置边框
padding 填充,设置内边距
bottom 底部;最下部;
margin 页边空白;白边,设置外边距
align 校准,排整齐
布局常用样式属性:
-
width 设置元素(标签)的宽度,如:width:100px;
-
height 设置元素(标签)的高度,如:height:200px;
-
background 设置元素背景色或者背景图片,如:background:gold; 设置元素背景色为金色
-
border 设置元素四周的边框,如:border:1px solid black; 设置元素四周边框是1像素宽的黑色实线
以上也可以拆分成四个边的写法,分别设置四个边的:
-
border-top 设置顶边边框,如:border-top:10px solid red;
-
border-left 设置左边边框,如:border-left:10px solid blue;
-
border-right 设置右边边框,如:border-right:10px solid green;
-
border-bottom 设置底边边框,如:border-bottom:10px solid pink;
-
padding 设置元素包含的内容和元素边框的距离,也叫内边距,如padding:20px;padding是同时设置4个边的,也可以像border一样拆分成分别设置四个边:padding-top、padding-left、padding-right、padding-bottom。
-
margin 设置元素和外界的距离,也叫外边距,如margin:20px;margin是同时设置4个边的,也可以像border一样拆分成分别设置四个边:margin-top、margin-left、margin-right、margin-bottom。
-
float 设置元素浮动,浮动可以让块元素排列在一行,浮动分为左浮动:float:left; 右浮动:float:right;
文本常用样式属性一:
-
color 设置文字的颜色,如: color:red;
-
font-size 设置文字的大小,如:font-size:12px;
-
font-family 设置文字的字体,如:font-family:'微软雅黑';为了避免中文字不兼容,一般写成:font-family:'Microsoft Yahei';
-
font-weight 设置文字是否加粗,如:font-weight:bold; 设置加粗 font-weight:normal 设置不加粗
-
line-height 设置文字的行高,如:line-height:24px; 表示文字高度加上文字上下的间距是24px,也就是每一行占有的高度是24px
-
text-decoration 设置文字的下划线,如:text-decoration:none; 将文字下划线去掉
-
text-align 设置文字水平对齐方式,如text-align:center 设置文字水平居中
-
text-indent 设置文字首行缩进,如:text-indent:24px; 设置文字首行缩进24px
<!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>
/* 这是样式里面的注释 */
.box{
/* 这是宽度 */
width: 300px;
/* 设置高度 */
height: 300px;
/* 设置背景色 */
background: darkcyan;
/* 设置四周的边框solid 实线,double 两个线,
会让边框变大,但是设置外边距不会变大,
*/
border: 10px solid black;
/* 设置顶部的边框 */
border-top: 10px solid yellow;
/* 设置地步边框 */
border-bottom:10px solid red;
/* 设置四个边内边距 */
padding: 20px;
/* 设置顶部的内边距 */
padding-top: 30px;
/* 设置四个边的外边距 */
margin: 50px;
/* 外边距拆分设置 */
margin-top: 100px;
}
</style>
</head>
<body>
<div class="box">
本文并不是讲解爬虫的相关技术实现的,而是从实用性的角度,将抓取并存入 MongoDB 的数据 用 InfluxDB 进行处理,而后又通过 Grafana 将爬虫抓取数据情况通过酷炫的图形化界面展示出来。
在开始之前,先对 Grafana 和 InfluxDB 做一下简要的介绍:
Grafana:是一个开源的分析和监控系统,拥有精美的web UI,支持多种图表,可以展示influxdb中存储的数据,并且有报警的功能。Influxdb :是一款开源的时间序列数据库,专门用来存储和时间相关的数据(比如我用它存储某个时间点爬虫抓取信息的数量)。
</div>
</body>
</html>