摘要: 单行垂直居中: <head> <meta charset="UTF-8"> <title>垂直居中示例</title> <style> .hello { height: 200px; display: flex; justify-content: center; align-items: cente 阅读全文
posted @ 2026-04-30 09:38 lvxuel 阅读(2) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>自动折行示例</title> <style> .box { width: 400px; height: 100px; background-color: red; display: 阅读全文
posted @ 2026-04-30 09:30 lvxuel 阅读(6) 评论(0) 推荐(0)
摘要: <head> <meta charset="UTF-8"> <title>多行文本垂直居中</title> <style> .text-box { height: 200px; padding-top: 100px; padding-bottom: 100px; background-color: 阅读全文
posted @ 2026-04-30 09:16 lvxuel 阅读(7) 评论(0) 推荐(0)
摘要: <head> <meta charset="UTF-8"> <title>垂直居中示例</title> <style> .hello { height: 200px; display: flex; justify-content: center; align-items: center; backg 阅读全文
posted @ 2026-04-30 09:13 lvxuel 阅读(8) 评论(0) 推荐(0)
摘要: <head> <meta charset="UTF-8"> <title>多行文本垂直居中</title> <style> .text-box { height: 200px; display: flex; justify-content: center; align-items: center; 阅读全文
posted @ 2026-04-30 09:04 lvxuel 阅读(6) 评论(0) 推荐(0)
摘要: <head> <title>新闻折叠·极简版</title> <style> body { font-family: Arial, sans-serif; margin: 30px; } .news-item { margin-bottom: 20px; /* 条目间距,无下划线 */ } .new 阅读全文
posted @ 2026-04-27 20:18 lvxuel 阅读(4) 评论(0) 推荐(0)
摘要: 图片区域150x120 图片区域150x120 图片区域150x120 图片区域150x120 阅读全文
posted @ 2026-04-17 21:04 lvxuel 阅读(5) 评论(0) 推荐(0)
摘要: 创建一个有左右部分的页面,在style中输入 body{ color: #fff; font-family: "微软雅黑"; font-size: 48px; } .top{ float: left; width: 200px; height: 1000px; background-color: # 阅读全文
posted @ 2026-04-09 12:29 lvxuel 阅读(2) 评论(0) 推荐(0)
摘要: 如何给同一个页面设置不同样式的超级链接? 给需要特殊样式的链接添加不同的类名,然后分别定义样式。 在style中输入: /* 普通链接样式 / a { color: blue; text-decoration: underline; } / 特殊样式1:红色、无下划线 / a.special1 { 阅读全文
posted @ 2026-03-30 17:17 lvxuel 阅读(3) 评论(0) 推荐(0)
摘要: 1.新建项目,项目名称mySite,路径D盘根目录下。 2.新建样式文件,名称为style.css,并通过外部引入到主页中。 3.主页中,插入标题一、标题二和一个段落,内容自拟 4.设置页面背景色为淡蓝色,标题一和标题二文本颜色为橙色,段落文本颜色为红色 5.新建子页,子页背景色和主页背景色一致 打 阅读全文
posted @ 2026-03-19 17:21 lvxuel 阅读(4) 评论(0) 推荐(0)