摘要: ![ce4654d1-48e3-4c03-9a24-1306ef38ab1a](https://img2024.cnblogs.com/blog/3777770/202609/3777770-20260908190208178-671215347.png) ![850edc00-2120-4618-ad8c-3d693504bfba](https://img2024.cnblogs.com/blo 阅读全文
posted @ 2026-09-08 19:03 nichengzhang 阅读(3) 评论(0) 推荐(0)
摘要: div{ margin: 0 auto;/*容器相对于页面剧中*/ font-size: 16px; font-family: "微软雅黑"; text-align: center;/*容器中的内容相对容器居中*/ text-indent: 2em;/*首行缩进*/ font-weight: 400 阅读全文
posted @ 2026-07-10 14:12 nichengzhang 阅读(9) 评论(0) 推荐(0)
摘要: <html> <head> <meta charset="UTF-8"> <title>弹性布局</title> </head> <style> .container1{ justify-content:start; } .container2{ justify-content:end; } .co 阅读全文
posted @ 2026-06-26 15:48 nichengzhang 阅读(15) 评论(0) 推荐(0)
摘要: <html> <head> <meta charset="UTF-8"> <title></title> <style> .container1{ align-items: flex-start; /*justify-content: flex-start;*/ } .container2{ ali 阅读全文
posted @ 2026-06-26 15:48 nichengzhang 阅读(9) 评论(0) 推荐(0)
摘要: .box1{ float: left; width: 403px; height: 200px; margin-left: 70px; padding-bottom: 18px; } .img1{ width: 122px; float: left; height: 152px; } .txt{ f 阅读全文
posted @ 2026-06-14 19:52 nichengzhang 阅读(7) 评论(0) 推荐(0)
摘要: #number_nav ul li { float: left; list-style-type: none; } #number_nav ul li a{ color: #F0F0F0; text-decoration: none; display: inline-block; width: 20 阅读全文
posted @ 2026-06-14 19:52 nichengzhang 阅读(9) 评论(0) 推荐(0)
摘要: 盒模型与居中技巧 • 水平居中: margin: 0 auto; 要求元素有固定宽度且为块级元素。 • 绝对定位居中: img_switch_text 设置 position: absolute; bottom: 5px; left: 10px; 相对于父容器 #img_switch定位。 浮动清除 阅读全文
posted @ 2026-05-31 19:13 nichengzhang 阅读(8) 评论(0) 推荐(0)
摘要: <style> .parent{ margin: 100px auto; width: 800px; height: 400px; border: 10px solid red; /*相对*/ position: relative; } .son{ width: 100px; height: 100 阅读全文
posted @ 2026-05-24 16:56 nichengzhang 阅读(10) 评论(0) 推荐(4)
摘要: margin: 0 auto – 块级元素水平居中,前提是元素有明确的宽度 text-indent: 2em – em 是相对单位,相对于当前元素的 font-size,所以缩进距离会随字号变化 span { font-style: italic; /* 文本倾斜(斜体) */ } #font { 阅读全文
posted @ 2026-05-20 08:33 nichengzhang 阅读(10) 评论(0) 推荐(4)
摘要: 表单的基本概念 定义:表单是用户数据录入和提交的界面,也是网站获取用户信息的途径。 作用:通过在网页中添加表单元素,实现用户与网站的交互,如数据收集、用户操作等。 语义化表单的制作 使用语义化的HTML标签,构建清晰的表单结构,提高代码可读性和可访问性。 HTML5表单验证的初步了解 通过HTML5 阅读全文
posted @ 2026-05-20 08:26 nichengzhang 阅读(13) 评论(0) 推荐(4)