摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> .box1{ /* * 使用width来设置盒子内容区的宽度 * 使用height来设置盒子内容区的高度 * * 阅读全文
posted @ 2021-06-08 23:01 juham 阅读(32) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> .p1 { /* * text-transform可以用来设置文本的大小写 * 可选值: * none 默认值,该 阅读全文
posted @ 2021-06-08 22:53 juham 阅读(74) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> /* * 在CSS并没有为我们提供一个直接设置行间距的方式, * 我们只能通过设置行高来间接的设置行间距,行高越大 阅读全文
posted @ 2021-06-08 22:52 juham 阅读(229) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> .p1{ color: red; font-size: 30px; font-family: "微软雅黑"; /* 阅读全文
posted @ 2021-06-08 22:50 juham 阅读(49) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> p{ font-family: arial , 微软雅黑 , 华文彩云 , serif; } </style> < 阅读全文
posted @ 2021-06-08 21:49 juham 阅读(296) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> .p1{ /*设置字体颜色,使用color来设置文字的颜色*/ color: red; /* * 设置文字的大小, 阅读全文
posted @ 2021-06-08 21:47 juham 阅读(243) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> .box1{ width: 100px; height: 100px; /* * 颜色单位: * 在CSS可以直接 阅读全文
posted @ 2021-06-08 17:24 juham 阅读(390) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> /* * 长度单位 * 像素 px * - 像素是我们在网页中使用的最多的一个单位, * 一个像素就相当于我们屏幕 阅读全文
posted @ 2021-06-08 17:20 juham 阅读(19) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> /* 去掉项目符号 * */ /*ul{ list-style: none; }*/ </style> </hea 阅读全文
posted @ 2021-06-08 11:48 juham 阅读(32) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <!-- em和strong - 这两个标签都表示一个强调的内容, em主要表示语气上的强调,em在浏览器中默认使用斜体显示 str 阅读全文
posted @ 2021-06-08 11:37 juham 阅读(60) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> /* * 涉及到a的伪类一共有四个: * :link * :visited * :hover * :active 阅读全文
posted @ 2021-06-08 11:23 juham 阅读(75) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> .p1{ background-color: yellow; } p{ background-color: red 阅读全文
posted @ 2021-06-08 11:19 juham 阅读(454) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> body{ font-size: 30px; } </style> </head> <body> <!-- 像儿子 阅读全文
posted @ 2021-06-08 11:11 juham 阅读(31) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> /* * 为所有的p元素设置一个背景颜色为黄色,除了class值为hello的 * * 否定伪类: * 作用:可以 阅读全文
posted @ 2021-06-08 11:05 juham 阅读(40) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> /* * 为span后的一个p元素设置一个背景颜色为黄色 * 后一个兄弟元素选择器 * 作用:可以选中一个元素后紧 阅读全文
posted @ 2021-06-08 11:01 juham 阅读(94) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> /* * 为第一个p标签设置一个背景颜色为黄色 * :first-child 可以选中第一个子元素 * :last 阅读全文
posted @ 2021-06-08 10:59 juham 阅读(84) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> /* * 为所有具有title属性的p元素,设置一个背景颜色为黄色 * 属性选择器 * - 作用:可以根据元素中的 阅读全文
posted @ 2021-06-08 10:46 juham 阅读(51) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> /* * 使用伪元素来表示元素中的一些特殊的位置 */ /* * 为p中第一个字符来设置一个特殊的样式 */ /* 阅读全文
posted @ 2021-06-08 10:44 juham 阅读(54) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> /* * 伪类专门用来表示元素的一种的特殊的状态, * 比如:访问过的超链接,比如普通的超链接,比如获取焦点的文本 阅读全文
posted @ 2021-06-08 09:18 juham 阅读(49) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> /* * 为div中的span设置一个颜色为绿色 * 后代元素选择器 * - 作用: * - 选中指定元素的指定后 阅读全文
posted @ 2021-06-08 09:07 juham 阅读(77) 评论(0) 推荐(0) 编辑