diff --git "a/\346\235\216\346\200\235/20241104-flex.md" "b/\346\235\216\346\200\235/20241104-flex.md" new file mode 100644 index 0000000000000000000000000000000000000000..f0308878b7c3e623fd6e1bc9096a4e0193ecf8f2 --- /dev/null +++ "b/\346\235\216\346\200\235/20241104-flex.md" @@ -0,0 +1,235 @@ + + +### align-items属性 +align-items:设置子元素在侧轴上的对齐方式。 +属性值可以是: + - flex-start 从侧轴开始的方向对齐 + - flex-end 从侧轴结束的方向对齐 + - baseline 基线 默认同flex-start + - center 中间对齐 + - stretch 拉伸 + +#### 拉伸属性 + +flex-basis、flex-grow和flex-shrink是Flexbox布局中控制弹性盒子大小的三个主要属性 + +flex-grow + 作用:定义弹性盒子相对于其他弹性盒子的拉伸比例 + 默认值:0(不拉伸) + 用法:flex-grow: ;,其中是一个正整数,表示该弹性盒子应该拉伸占据的额外空间的比例。 + + +flex-shrink + 作用:定义了弹性盒子在必要时收缩的比例 + 默认值:1(在必要时收缩) + 用法:flex-shrink: ;,其中是一个正整数,表示该弹性盒子应该收缩以适应容器空间的减少的比例。 + + +flex-basis + 作用:定义了弹性盒子在分配多余空间之前的初始大小。 + 定义:flex-basis属性指定了弹性盒子在分配多余空间之前,它的默认大小。这个大小是主轴方向上的,可以是长度值(如px、em等)或百分比。 + 用法:flex-basis: | auto | content; + :指定一个具体的长度值作为弹性盒子的初始大小。 + auto:默认值,表示弹性盒子的初始大小基于其内容的实际大小。 + content(实验性功能):表示弹性盒子的初始大小基于其内容的大小,但会考虑一些额外的因素,如内边距和边框。然而,content值目前并不是所有浏览器都支持的标准值。 + + +这三个属性可以单独使用,也可以通过flex简写属性一起设置。 +flex:1 1 auto; + + + +媒体式查询: + @media screen and(max-width:500px){ + .x{ + flex-direction:column; + } + } + 当屏幕的宽度不大于500px时设置class为x的弹性盒子的主轴从上到下对齐 + + + + ## 练习 +1. 播放器 +![alt text](<屏幕截图 2024-11-10 151954.png>) + ``` + .i1{ + width: 150px; + height: 150px; + background: url(../图片素材/flex-01.jpg); + border-radius: 10px; + } + .i2{ + width: 150px; + height: 150px; + background: url(../图片素材/flex-02.jpg); + border-radius: 10px; + } + .i3{ + width: 150px; + height: 150px; + background: url(../图片素材/flex-03.jpg); + border-radius: 10px; + } + .i4{ + width: 150px; + height: 150px; + background: url(../图片素材/flex-04.jpg); + border-radius: 10px; + } + .i5{ + width: 150px; + height: 150px; + background: url(../图片素材/flex-05.jpg); + border-radius: 10px; + } + .i6{ + width: 150px; + height: 150px; + background: url(../图片素材/flex-06.jpg); + border-radius: 10px; + } + .i7{ + width: 150px; + height: 150px; + background: url(../图片素材/flex-07.jpg); + border-radius: 10px; + } + .i8{ + width: 150px; + height: 150px; + background: url(../图片素材/flex-08.jpg); + border-radius: 10px; + } + + .t1{ + display: flex; + flex-direction: row; + } + .t2{ + display: flex; + flex-direction: row; + } + .d1{ + width: 48%; + margin: 2%; + float: left; + box-sizing: border-box; + margin-top: 20px; + + padding-top: 2px; + position: relative; + } + span{ + position: absolute; + top: 120px; + left: 5px; + color: white; + font-size: small; + } + p{ + width: 150px; + margin-top: 5px; + font-size: small; + } + @media only screen and (max-width:500px) and (min-width:0px){ + .d1{ + + margin:0 20px 0 0; + float: none; + } + } + + ``` + + 2. 视频 + ``` + + ``` \ No newline at end of file diff --git "a/\346\235\216\346\200\235/20241106-\351\235\231\346\200\201\347\275\221\347\253\231.md" "b/\346\235\216\346\200\235/20241106-\351\235\231\346\200\201\347\275\221\347\253\231.md" new file mode 100644 index 0000000000000000000000000000000000000000..b35275821b7b77b70e55ad012c7d6e786ebbc344 --- /dev/null +++ "b/\346\235\216\346\200\235/20241106-\351\235\231\346\200\201\347\275\221\347\253\231.md" @@ -0,0 +1,84 @@ + +## 笔记 + + 协议 http\https + 主机地址 + 端口(默认为:80,个人为:8080或:8088) + 访问路径 + 虚拟参数 + +静态网站搭建必备条件 +1. 具有公网IP地址的主机(服务器) + 已经通过备案的域名 + +2. 在主机上部署网站 + web服务器 + nginx + apache + 已经写好的网站 + + + + +## 作业 + +3. 经典圣杯布局 +![alt text](<屏幕截图 2024-11-10 152041.png>) +![alt text](<屏幕截图 2024-11-10 152052.png>) +``` + +``` \ No newline at end of file diff --git "a/\346\235\216\346\200\235/20241107-\345\270\203\345\261\200\346\241\206\346\236\266.md" "b/\346\235\216\346\200\235/20241107-\345\270\203\345\261\200\346\241\206\346\236\266.md" new file mode 100644 index 0000000000000000000000000000000000000000..791ccbd55824988952c86e4e9e5766aaaae1fe71 --- /dev/null +++ "b/\346\235\216\346\200\235/20241107-\345\270\203\345\261\200\346\241\206\346\236\266.md" @@ -0,0 +1,808 @@ +## 练习 + +5. 携程 +![alt text](<屏幕截图 2024-11-10 152147.png>) +``` + + + +
+
+

搜索:目的地/酒店/景点/航班

+

我的

+
+ +
+
+
+
景点.玩乐
+
+
+
+
景点.玩乐
+
+
+
+
景点.玩乐
+
+
+
+
景点.玩乐
+
+
+
+
景点.玩乐
+
+
+
+
+
海外酒店
+
+
+
海外酒店
+
海外酒店
+
+
特价酒店
+
特价酒店
+
+
+
+
海外酒店
+
+
+
海外酒店
+
海外酒店
+
+
特价酒店
+
特价酒店
+
+
+
+
海外酒店
+
+
+
海外酒店
+
海外酒店
+
+
特价酒店
+
特价酒店
+
+
+
+
+
+

电话费

+

电话费

+

电话费

+

电话费

+

电话费

+
+
+

电话费

+

电话费

+

电话费

+

电话费

+

电话费

+
+
+
+
+

获取更多福利>

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +``` + +6. 京东 +![alt text](<屏幕截图 2024-11-10 151933.png>) +``` + *{ + margin: 0px; + padding: 0px; + } + body{ + width: 100vw; + height: 100vh; + display: flex; + justify-content: center; + } + .box{ + width: 390px; + height: 970px; + display: flex; + flex-direction: column; + } + .top{ + width: 390px; + height: 40px; + display: flex; + background-color: #322e2e; + } + .x{ + width: 30px; + background-image: url(https://oss.9ihub.com/test/dh5-close.png); + background-position: 7px 9px; + background-size: 60%; + background-repeat: no-repeat; + } + .a1{ + width:250px; + background-image: url(https://oss.9ihub.com/test/dh5-logo.png); + background-repeat: no-repeat; + background-position: 3px 5px; + background-size: 10%; + margin-top: 3px; + margin-left: 10px; + } + .a1>span{ + font-size: 13px; + color: white; + position: relative; + top: 5px; + left: 40px; + } + .a2{ + background-color: rgb(242, 79, 79); + color: white; + width: 110px; + display: flex; + justify-content: center; + align-items: center; + } + .center{ + width: 390px; + height: 310px; + display: flex; + background-color: rgb(195, 10, 11); + } + .search{ + width: 390px; + height: 40px; + + } + .s1{ + width: 390px; + height: 40px; + background-color: rgb(195, 10, 11); + background-image: url(https://oss.9ihub.com/test/dh5-list.png); + background-repeat: no-repeat; + background-position: 10px 12px; + background-size: 5%; + position: sticky; + top: 0; + display: flex; + justify-content: center; + align-items: center; + } + .ssk{ + width: 260px; + height: 30px; + background-color: #fff; + border-radius: 15px; + display: flex; + justify-content: center; + align-items: center; + margin-left: -30px; + background-image: url(https://oss.9ihub.com/test/dh5-left-jd.png); + background-repeat: no-repeat; + background-size: 8%; + background-position: 8px 8px; + } + .gan{ + color: lightgray; + position: relative; + top: -2px; + left: 3px; + } + .ss{ + width: 25px; + height: 25px; + background-image: url(https://oss.9ihub.com/test/dh5-jd-sprites.png); + background-repeat: no-repeat; + background-position: -148px 3px; + background-size: 1000%; + } + .s1 input{ + border: none; + margin-left: 8px; + } + .s1 span{ + color: white; + position: relative; + right: -45px; + top: 0px; + } + .s2{ + width: 390px; + height:150px; + background-image: url(https://oss.9ihub.com/test/jdh5-banner.png); + background-size: 100%; + background-repeat: no-repeat; + } + .s3{ + height: 115px; + margin-top: 5px; + display: flex; + } + .ss1{ + width: 92px; + height: 130px; + background-image: url(https://oss.9ihub.com/test/dh5-nianhuo1.png); + background-repeat: no-repeat; + background-position: 5px 0; + background-size: 95%; + } + .ss2{ + width: 200px; + height: 130px; + background-image: url(https://oss.9ihub.com/test/dh5-nianhuo2.png); + background-repeat: no-repeat; + background-position: 6px 0; + background-size:95%; + } + .ss3{ + width: 92px; + height: 130px; + background-image: url(https://oss.9ihub.com/test/jdh5-nianhuo3.png); + background-repeat: no-repeat; + background-position: 3px 0; + background-size: 95%; + } + .shop{ + width: 390px; + height: 150px; + } + .one,.two{ + height: 60px; + display: flex; + justify-content: space-around; + align-items: center; + } + .d1{ + width:50px; + height: 40px; + background-image: url(https://oss.9ihub.com/test/dh5-nav1.png); + background-repeat: no-repeat; + background-position: 0 0; + background-size: 80%; + } + .d2{ + width:50px; + height: 40px; + background-image: url(https://oss.9ihub.com/test/dh5-nav2.png); + background-repeat: no-repeat; + background-position: 0 0; + background-size: 80%; + } + .d3{ + width:50px; + height: 40px; + background-image: url(https://oss.9ihub.com/test/dh5-nav3.png); + background-repeat: no-repeat; + background-position: 0 0; + background-size: 80%; + } + .d4{ + width:50px; + height: 40px; + background-image: url(https://oss.9ihub.com/test/dh5-nav4.png); + background-repeat: no-repeat; + background-position: 0 0; + background-size: 80%; + } + .d5{ + width:50px; + height: 40px; + background-image: url(https://oss.9ihub.com/test/dh5-nav5.png); + background-repeat: no-repeat; + background-position: 0 0; + background-size: 80%; + } + .d6{ + width:50px; + height: 40px; + background-image: url(https://oss.9ihub.com/test/dh5-nav6.png); + background-repeat: no-repeat; + background-position: 0 0; + background-size: 80%; + } + .d7{ + width:50px; + height: 40px; + background-image: url(https://oss.9ihub.com/test/dh5-nav7.png); + background-repeat: no-repeat; + background-position: 0 0; + background-size: 80%; + } + .d8{ + width:50px; + height: 40px; + background-image: url(https://oss.9ihub.com/test/dh5-nav8.png); + background-repeat: no-repeat; + background-position: 0 0; + background-size: 80%; + } + .d9{ + width:50px; + height: 40px; + background-image: url(https://oss.9ihub.com/test/dh5-nav9.png); + background-repeat: no-repeat; + background-position: 0 0; + background-size: 80%; + } + .d10{ + width:50px; + height: 40px; + background-image: url(https://oss.9ihub.com/test/dh5-nav10.png); + background-repeat: no-repeat; + background-position: 0 0; + background-size: 80%; + } + .jdcs{ + width: 50px; + height:10px; + font-size: 12px; + color: rgb(170, 168, 168); + position: relative; + top: 40px; + } + .jdms{ + width: 390px; + height: 130px; + margin-top: 10px; + } + .j1{ + width: 390px; + height: 20px; + display: flex; + } + .ms,.gd{ + width:100px; + font-weight: bold; + position: relative; + left: 5px; + } + .dc{ + width:20px; + background-image: url(https://oss.9ihub.com/test/dh5-ms-dc.png); + background-size:100%; + background-repeat: no-repeat; + margin-left: 5px; + } + .tt{ + width: 15px; + background-image: url(https://oss.9ihub.com/test/dh5-ms-right.png); + background-repeat: no-repeat; + background-size: 100%; + position: relative; + top: 5px; + right:-145px; + } + .j2{ + width: 390px; + height: 100px; + display: flex; + justify-content: space-around; + align-items: center; + } + .ji1{ + width: 65px; + height: 90px; + background-image: url(https://oss.9ihub.com/test/jdh5-ms1.jpg); + background-repeat: no-repeat; + background-size: 100%; + } + .ji2{ + width: 65px; + height: 90px; + background-image: url(https://oss.9ihub.com/test/jdh5-ms2.jpg); + background-repeat: no-repeat; + background-size: 100%; + } + .ji3{ + width: 65px; + height: 90px; + background-image: url(https://oss.9ihub.com/test/jdh5-ms3.jpg); + background-repeat: no-repeat; + background-size: 100%; + } + .ji4{ + width: 65px; + height: 90px; + background-image: url(https://oss.9ihub.com/test/jdh5-ms4.jpg); + background-repeat: no-repeat; + background-size: 100%; + } + .ji5{ + width: 65px; + height: 90px; + background-image: url(https://oss.9ihub.com/test/jdh5-ms5.jpg); + background-repeat: no-repeat; + background-size: 100%; + } + .ji6{ + width: 65px; + height: 90px; + background-image: url(https://oss.9ihub.com/test/jdh5-ms6.jpg); + background-repeat: no-repeat; + background-size: 100%; + } + .money{ + width: 50px; + height: 30px; + color:red; + font-size: 13px; + position: relative; + top: 65px; + left: 15px; + } + .sp{ + width: 390px; + height: 200px; + display: flex; + background-color: rgb(247, 247, 247); + } + .l1{ + width: 195px; + height: 195px; + margin: 10px; + background-image: url(https://oss.9ihub.com/test/jdh5-product1.webp); + background-repeat: no-repeat; + background-position: 0 0; + background-size: 100%; + } + .l2{ + width: 195px; + height: 195px; + margin: 10px; + background-image: url(https://oss.9ihub.com/test/jdh5-product2.webp); + background-repeat: no-repeat; + background-position: 0 0; + background-size: 100%; + } + .banner{ + width: 390px; + height: 80px; + background-color: #8bd4e0; + position: fixed; + bottom: 0; + z-index: 1000; + display: flex; + justify-content: space-around; + align-items: center; + } + .ooo{ + color: lightgray; + } +``` \ No newline at end of file