随笔分类 -  前端小技巧

摘要:使用flex布局 <div class="content"> <div class="box"> </div> </div> .content{ height: 100vh; display: flex; justify-content: center; align-items: center; } 阅读全文
posted @ 2023-10-20 14:57 Morita-desin 阅读(18) 评论(0) 推荐(0)
摘要:HTML常用标签 标题标签 <h1>这是一级标题</h1> <h2>这是二级标题</h2> <h3>这是三级标题</h3> <h4>这是四级标题</h4> <h5>这是五级标题</h5> <h6>这是六级标题</h6> 段落与换行 <p>这是第一段</p> <p>这是第二段</p> <p>这是第一段 阅读全文
posted @ 2023-10-14 16:21 Morita-desin 阅读(27) 评论(0) 推荐(0)
摘要:使用伪元素:::-webkit-scrollbar <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial- 阅读全文
posted @ 2023-10-14 03:50 Morita-desin 阅读(60) 评论(0) 推荐(0)
摘要:CSS3 1. CSS导入方式 优先级:就近原则 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>css导入方式</title> <!-- 2.内部样式 --> <style> h2{ color: aqua 阅读全文
posted @ 2023-08-17 21:08 Morita-desin 阅读(25) 评论(0) 推荐(0)
摘要:HTML5 1. 网页基本元素 <!DOCTYPE html><!--告诉浏览器使用什么规范--> <html lang="en"><!--总标签--> <head><!--代表网页头部--> <meta charset="UTF-8"><!--描述网页的一些信息--> <title>我的第一个网页 阅读全文
posted @ 2023-08-16 21:50 Morita-desin 阅读(22) 评论(0) 推荐(0)
摘要:文字水平垂直居中 文字行高 = 盒子高 <body> <div>文字垂直居中</div> </body> div { height: 40px; width: 250px; font-size: 16px; background-color: aqua; line-height: 40px; tex 阅读全文
posted @ 2023-06-16 20:58 Morita-desin 阅读(30) 评论(0) 推荐(0)