当前位置:网站首页>知识点qwer
知识点qwer
2022-07-28 14:44:00 【springxing星】
<文档类型声明,浏览器按H5要求来渲染页面>
<!DOCTYPE html>
<html> /* 根标签开始 */
<head> /*头部标签开始,放网页配置和引入文件,比如title,meta,link */
<title>
页面标题 /*搜索所占权重很大,不能乱写*/
</title>
<meta charset = "utf-8"> /*设置字符编码,防止页面乱码*/
</head> /*头部标签结束*/
<body> /*主体开始*/
放各种标签,配置页面内容
</body> /*主体结束*/
</html> /*根标签结束*/
标签分类:
1.通过有无结束标签分为单标签和双标签,单表签有meta,img,input,br,hr,source
2.通过有无语义分为有语义和无语义标签,无语义的有div,span
3.通过标签显示方式分为块级标签,行内标签,行块标签
块级标签是独占整行,宽高生效,常用的有html,body,div,p,h1-h6,ul,li,table,tr,td,th,hr
行内标签是行内和行快可以在同一行显示,宽高不生效,根据内容多少显示宽高,常用的有span,img,a,em,i,strong,b,u
行快标签是行内和行快可以在同一行显示,宽高生效,没有的话按照内容多少显示宽高。常用的有img,input,td,th
插入图片:<img src="路径" alt=“图片破损的文字” width="宽" height=“高”>
超链接: <a href="地址" target="_blank"> (target不写默认就是在当前页面打开)
图片和文字
</a>
字体:font-size:1px(字体大小)
font-weight:bold;( 字体宽度100-900)
font-family:“微软雅黑”;
font-style:斜体;
三种样式引入方式:1.行内少用 2.内部样式用style标签在head里面,用于写demo 3.外部样式在外面新建css,用link标签放在head里,用于写项目
文本颜色:color:white;/#fff;
文本水平对齐:text-align:center;/left/right;
文本垂直对齐:line-height:50px;
图片和文字对齐: vertical-align: middle;
首行缩进两字符:text-indent:2em;
文本下划线:text-decoration:underline;
文本和字母间距10px: letter-spacing:10px;
单词间距10px: word-spacing:10px;
表格:
合并边框:border-collapse: collapse;
设置边框:border:1px solid red;
table是表格,块级,双标签,用于展示数据
caption是表格标题,水平居中对齐,加粗
td是普通单元格,th是表头单元格,都是行块标签,colspan=“2”合并横着的 rowspan=“2”合并竖着的
多个选择器选到同一个标签,有相同的样式名,用哪个样式值取决于选择器的优先级(标签是1,类选择器是10)
修改显示方式:display:line(行内) display:block(块级) display:line-block(行块)
背景是否平铺:background-repeat:no-repeat/repeat-x/repeat-y
背景颜色:background-color:red;
插入背景图片:background-img:url(路径);
背景位置:background-position:1.center bottom;(中下) 也可以2.按百分比 2% 10% 或者3.具体值 100px 200px;
盒模型五样式:1.宽 2.高 3.边框(border) 4.内边距(padding)5.外边距(margin)
border:1px solid red;
border-top/bottom/right/left
solid实线 dashed虚线 dotted点线 double双线
padding:10px 10px 10px 10px 规律是上左下右 transparent透明的
padding-top:
margin:10px 10px 10px 10px 规律是上左下右
margin-top:
边栏推荐
- How to compress and decompress ramdisk.img
- Editor in ArcGIS Pro
- Sharing of award-winning activities: you can get up to iphone13 after using WordPress to build your own blog
- About how Simulink generates model coverage reports
- 1200 times faster! MIT develops a new generation of drug research and development AI, and suspends the old model
- Software architecture and design (VIII) -- distributed architecture
- samba服务器搭建指南
- 20. Channel allocation task implementation
- 一篇文章了解RSocket协议
- 一波骚操作解决Laya场景编辑器报错问题
猜你喜欢

flowable工作流所有业务概念

软件架构与设计(四)-----数据流架构

How many of the top ten test tools in 2022 do you master

Getting started with crawlers (1) -- requests (1)

语音社交系统——完善有声系统产业链

融云实时社区解决方案

Docker实现Redis Cluster(集群)模式 哈希槽分区进行亿级数据存储

Software architecture and design (VIII) -- distributed architecture

Nftscan and nftplay have reached strategic cooperation in the field of NFT data

关于Simulink如何生成模型覆盖率报告
随机推荐
Sharing of award-winning activities: you can get up to iphone13 after using WordPress to build your own blog
Preparing for listing in the United States? Arm announced that it would divest the Internet of things service business: the future will focus on the underlying chip design
PyQt5快速开发与实战 5.2 容器:装载更多的控件
Try... Except exception handling statement (6)
Matlab does not overwrite importing Excel
Framework定制系列(六)-----屏蔽FallbackHome手机启动中弹窗直接进入Launcher
QT refresh UI interface problem
软件架构与设计(九)-----基于组件的架构
基于RSocket协议实现客户端与服务端通信
10. Implementation of related data accumulation task
Software architecture and design (VIII) -- distributed architecture
Differences between two ways of QT creating folders
如何压缩与解压缩ramdisk.img
QCustomPlot绘图工具常用方法
Common methods of qcustomplot drawing tools
生命的感悟
Give you a linked list, delete the penultimate node of the linked list, and return the head node of the linked list.
如何有效进行回顾会议(上)?
Canoe tutorial
玩死原型链