随笔分类 - web
摘要:层叠性:主要结果样式冲突 继承性:元素会拥有祖先元素的某些样式,优先继承离得近的,color 和 font-size 可以继承 优先级:!important > 行内样式 > id选择器 > 类选择器 > 元素选择器 > 通配选择器 > 继承样式
阅读全文
摘要:1. 通配选择器 作用:可以选中所有的 html 元素,对于清除样式有帮助 * {属性名:属性值} 2. 元素选择器 元素名 {属性名:属性值} 3. 类选择器 根据 class 来进行分类,类选择器需要用,使用频率很高 .class值{属性名:属性值} ps: 多个class需要用空格连接写在一起
阅读全文
摘要:行内样式 写在style属性中,行内样式只能控制当前样式对其他标签无效 <h1 style="color: red; font-size:80px">欢迎光临</h1> #并不推荐使用 内部样式 <head> <style> h1{ color: red; font-size:80px; } </s
阅读全文
摘要:<!-- 配置字符编码 --> <meta charset="UTF-8"> <!-- 配置IE浏览器兼容性 --> <meta http-equiv="X-UA-Compatible" content="IE-edge"> <!-- 针对移动端一个配置 --> <meta name="viewpo
阅读全文
摘要:全局属性:id、class、 id 作用:锚点、label 表单控件关联 注意:不用在<head>、<html>、<meta>、<script>、<style>、<title>使用该属性 仅限一个 html 不能重复 class 作用:指定类名,配合 CSS 表示样式 style CSS 设置样式
阅读全文
摘要:用一种特殊形式表示字符例如 表示空格 < 小于号 > 大于号 & & ¥ ¥ © 版权所有 × × ÷ ÷ 详细参考 MDN
阅读全文
摘要:iframe 嵌入 嵌入广告 <iframe src="网址" height="" width="" frameborder=""></iframe> 与超链接 target 关联 <a href="httos://www.toutiao.com" target="container">头条</a>
阅读全文
摘要:表单 表单也就是交互区域 <form action="https://www.baidu.com/s" target="_self" method="get"> <input type="text" name="wd"> <button>搜索</button> </form> form 表单标签 m
阅读全文
摘要:块级元素:类似于段落标签、div,独占一行自动换行,什么都可以写 行级元素:类似于 input ,不能写块级元素 特殊规则:h1-h6不能嵌套,p标签里面不能写块元素 HTML5的基本骨架 <!DOCTYPE html> <html lang="en"> <head> </head> <body>
阅读全文

浙公网安备 33010602011771号