摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>圆角</title> <style type="text/css"> .box{ width: 200px; height: 200px; background-color: #8 阅读全文
posted @ 2022-05-11 21:08 氯丙嗪 阅读(10) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>二级标题练习</title> <style type="text/css"> .inner{ display: none; } .outer > li:hover .inner{ 阅读全文
posted @ 2022-05-09 16:21 氯丙嗪 阅读(18) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>块和行内</title> </head> <body> <!-- 块元素(block) 块元素用于页面布局 行内元素(inline) 行内元素主要用于页面中选中文字 一般情况下只会 阅读全文
posted @ 2022-05-09 15:44 氯丙嗪 阅读(14) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>visibility</title> <style type="text/css"> /* visibility可以设置元素的显示状态 可选值 visible默认值,元素正常显示 阅读全文
posted @ 2022-05-09 15:41 氯丙嗪 阅读(97) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>display</title> <style type="text/css"> /* display 指定元素所产生的框的类型 可选值 inline行内元素 block块元素 in 阅读全文
posted @ 2022-05-09 15:35 氯丙嗪 阅读(45) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>文档流</title> </head> <body> <!-- 文档流(标准流、常规流) 文档流是网页中的一个位置,默认情况页面中的所有元素都在文档流中排列 块元素在文档流中的特点 阅读全文
posted @ 2022-05-09 15:23 氯丙嗪 阅读(16) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>外边距的折叠</title> <style type="text/css"> /* 垂直方向相邻的外边距,会发生外边距折叠现象,兄弟元素间的相邻外边距,会取两个 外边距间最大值(正 阅读全文
posted @ 2022-05-09 15:15 氯丙嗪 阅读(21) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>垂直方向布局</title> <style type="text/css"> /* 垂直方向布局 如果不为父元素指定高度,则父元素会自动适应子元素的高度,确保能容纳所有子元素 如果 阅读全文
posted @ 2022-05-09 15:01 氯丙嗪 阅读(24) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>box-sizing</title> <style> .box{ width: 100px; height: 100px; border: 2px solid red; backg 阅读全文
posted @ 2022-05-09 14:39 氯丙嗪 阅读(7) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>水平方向布局</title> <style> /* 如果left和right都设置为auto,则会两侧外边距设置的是相等的值,从而导致子元素在父元素中水平居中 */ .box{ w 阅读全文
posted @ 2022-05-09 14:07 氯丙嗪 阅读(22) 评论(0) 推荐(0)