摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>盒子模型(框模型)——外边距</title> <style type="text/css"> /* 外边距 当前盒子和其他盒子之间的距离称为外边框,外边框不会影响盒子的可见框大小 阅读全文
posted @ 2022-05-09 14:02 氯丙嗪 阅读(41) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>盒子模型(框模型)——内边距</title> <style type="text/css"> /* 内边距 盒子的可见框大小由内容区,内边距共同决定 边框和内容区之间的边距叫做内边 阅读全文
posted @ 2022-05-09 13:52 氯丙嗪 阅读(31) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>盒子模型(框模型)——边框</title> <style type="text/css"> /* 边框(border) 不指定宽度,边框也会有一个默认宽度,一般是3px 不指定颜色 阅读全文
posted @ 2022-05-09 13:29 氯丙嗪 阅读(28) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>盒子模型</title> <style type="text/css"> .box{ width: 100px; height: 100px; /* 边框,是盒子的边界,出了边框就 阅读全文
posted @ 2022-05-08 22:32 氯丙嗪 阅读(27) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>选择器的权重</title> <style> /* 当我们使用不同的选择器选择了相同的元素,又为其同一个样式设置了不同的值, 此时就发生了样式的冲突 发生样式冲突时,显示那个样式, 阅读全文
posted @ 2022-05-08 22:20 氯丙嗪 阅读(31) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>伪元素</title> <style> /* 伪元素主要表示一些特殊元素 ::before表示元素开头的位置 ::after表示元素结束的位置 ::first-letter表示首字 阅读全文
posted @ 2022-05-08 22:12 氯丙嗪 阅读(13) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>a的伪类</title> <style type="text/css"> /* a的伪类 :link 正常的超链接(带有href的a标签) 主要用来设置没有访问过的超链接样式 :v 阅读全文
posted @ 2022-05-08 19:05 氯丙嗪 阅读(21) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>属性选择器</title> <style type="text/css"> /* 属性选择器 根据元素的属性来选中元素 [属性名]获取含有指定属性的元素 */ [title]{ w 阅读全文
posted @ 2022-05-08 18:55 氯丙嗪 阅读(8) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>伪类选择器</title> <style> /* 伪类选择器 :first-child表示第一个子元素(在所有子元素中查找) :first-of-type同类型中的第一个子元素 : 阅读全文
posted @ 2022-05-08 16:01 氯丙嗪 阅读(13) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>兄弟选择器</title> <style> p + span{ background-color: #00FFFF; } p ~ span{ background-color: # 阅读全文
posted @ 2022-05-08 15:27 氯丙嗪 阅读(20) 评论(0) 推荐(0)