昨日日记https://blog.csdn.net/P_xuebuhui/article/details/106456233
HTML5大纲
HTML5大纲分析工具网址:https://gsnedders.html5.org/outliner/
单独的header元素、footer元素不可以做大纲,因为大纲是根据标题元素h1-h6生成的,但可以在header元素中包含标题子元素,这样标题子元素中包含的内容或图片就可以生成大纲了
ol
使用start属性来定义开始值,使用type来定义变化的量,使用reversed来反向编号<ol start=" " type=" " reversed=reversed>
dl
专门定义术语的列表
dt,dd来表示定义
canvas
- 专门来绘制图形 getElementById来获取canvas对象
- 使用canvas对象的getContext()方法获得图形的上下文
- 绘制方法
填充(fill)
绘制边框(stroke) - 绘制样式
fillStyle 在属性里面设置填入的颜色值
strokeStyle 设置填入边框的颜色 - 通过上下文对象(context)的lineWidth来设置图形边框的宽度
- fillRect和strokeRect来填充矩形和绘制矩形的边框
context.fillRect(x,y,width,height)
ontext.strokeRect(x,y,width,height) - 使用圆形的方法context.beginPath();
- 创建圆形路径context.arc(x,y,radius,starAngle,endAngle,anticlockwise)
- 关闭路径方法context.closepath();
- 绘制字符串
填充方式context.fillText(text,x,y,[maxwidth]);
轮廓方式ontext.strokeText(text,x,y,[maxwidth]);