css布局
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | <!DOCTYPE html> <html lang= "en" > <head> <meta charset= "UTF-8" > <meta name= "viewport" content= "width=device-width, initial-scale=1.0" > <title>Document</title> <style> body { margin : 0 ; } .one { width : 100% ; height : 60px ; background-color : rgba( 0 , 0 , 0 , 0.5 ); } . left a { color : rgba( 255 , 255 , 255 , 0.7 ); text-decoration : none ; line-height : 60px ; margin : 20px ; } . left a:hover { color : rgba( 255 , 255 , 255 , 1 ); } .centent { width : 100% ; height : 100 vh; background-color : rgb ( 255 , 255 , 255 ); } .three img { width : 270px ; height : 129px ; } .three { text-align : center ; margin-bottom : 60px ; } .inp { text-align : center ; } .four { width : 550px ; height : 44px ; border : 2px solid rgb ( 149 , 149 , 181 ); outline : 0 ; border-radius: 10px 0 0 10px ; text-indent : 20px ; border-right : 0 ; padding : 0 ; vertical-align : bottom ; } .four:hover { border-color : blue ; } .fix { width : 108px ; height : 48px ; font-size : 17px ; border : 2px solid rgb ( 78 , 110 , 242 ); border-left : 0 ; line-height : 48px ; text-align : center ; padding : 0 ; background-color : rgb ( 78 , 110 , 242 ); color : #fff ; border-radius: 0 10px 10px 0 ; } .fix:hover{ border : 2px solid rgb ( 34 , 73 , 230 ); background-color : rgb ( 34 , 73 , 230 ); } </style> </head> <body> <div class= "centent" > <div class= "one" > <div class= "left" > <a href= "##" >新闻</a> <a href= "##" >hao 123 </a> <a href= "##" >地图</a> <a href= "##" >贴吧</a> <a href= "##" >视频</a> <a href= "##" >图片</a> <a href= "##" >网盘</a> <a href= "##" >更多</a> </div> </div> <div class= "three" > <a href= "https://www.baidu.com/s?wd=%E7%99%BE%E5%BA%A6%E7%83%AD%E6%90%9C&sa=ire_dl_gh_logo_texing&rsv_dl=igh_logo_pc" title= "百度一下你就知道" ><img src= "./img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt= "百度" ></a> </div> <div class= "inp" > <form action= "https://www.baidu.com/s" method= "get" > <input type= "text" name= "wd" class= "four" ><input type= "submit" value= "百度一下" class= "fix" > </form> </div> </div> </body> </html> |
css控制弧度
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .fix{ width: 800px; height: 120px; background-color: rgb(136, 184, 255); margin: 0 auto; display:table-cell; vertical-align: middle; box-sizing: border-box; padding-left: 25px; } .one{ width: 750px; height: 80px; background-color: white; border-radius: 30px; } .one span{ line-height: 80px; margin:0 30px; display:inline-block; } span:nth-child(1){ height: 60px; width: 150px; background-color: rgb(155, 205, 48); border-radius: 30px; line-height: 60px; text-align: center; } </style> </head> <body> <div class="fix"> <div class="one"> <span>网址首页</span> <span>关于我们</span> <span>公司简介</span> <span>成功案例</span> <span>联系我们</span> </div> </div> </body> </html>
css的小米布局
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | <!DOCTYPE html> <html lang= "en" > <head> <meta charset= "UTF-8" > <meta name= "viewport" content= "width=device-width, initial-scale=1.0" > <title>Document</title> <style> .centen{ width : 992px ; height : 315px ; background-color : rgb ( 245 , 245 , 245 ) ; margin : 0 auto ; display : flex; } .centen div{ margin-left : 10px ; margin-top : 6px ; } .one{ background-color : #fff ; width : 234px ; height : 300px ; text-align : center ; } .two{ background-color : #fff ; width : 234px ; height : 300px ; text-align : center ; } .three{ background-color : #fff ; width : 234px ; height : 300px ; text-align : center ; } .four{ background-color : #fff ; width : 234px ; height : 300px ; text-align : center ; } .test,.cc{ font-size : 12px ; color : #b0b0b0 ; } .title{ color : #ff6700 ; } .cc{ text-decoration : line-through ; } span{ color : #333 ; } .centen div a{ text-decoration : none ; } </style> </head> <body> <div class= "centen" > <div class= "one" > <a href= "https://www.mi.com/shop/buy/detail?product_id=19184" ><img src= "./img/one.webp" alt= "" > <span>Redmi Note 13 Pro</span> <p class= "test" >小金刚品质</p> <p class= "title" > 1399 元起 <span class= "cc" > 1499 元</span></p> </a> </div> <div class= "two" > <a href= "https://www.mi.com/shop/buy/detail?product_id=19185" > <img src= "./img/two.webp" alt= "" > <span> Redmi Note 13 Pro+ </span> <p class= "test" > 天玑 7200 -Ultra 处理器</p> <p class= "title" > 1899 元起 <span class= "cc" > 1999 元</span></p> </a> </div> <div class= "three" > <a href= "https://www.mi.com/shop/buy/detail?product_id=19182" > <img src= "./img/three.webp" alt= "" > <span> Redmi Note 13 5 G </span> <p class= "test" > 1 亿像素 更快更清晰</p> <p class= "title" > 1099 元起 <span class= "cc" > 1199 元</span></p> </a> </div> <div class= "four" > <a href= "https://www.mi.com/shop/buy/detail?product_id=19019" > <img src= "./img/four.webp" alt= "" > <span> Xiaomi MIX Fold 3 </span> <p class= "test" >轻薄折叠屏丨徕卡光学丨全焦段四摄</p> <p class= "title" > 8999 元起 </p> </a> </div> </div> </body> </html> |
本文来自博客园,作者:刘先生的爱心博客,转载请注明原文链接:https://www.cnblogs.com/liu521125/p/17755582.html
一点一滴记录着学习html5 css3 和js 的时光
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 零经验选手,Compose 一天开发一款小游戏!
· 一起来玩mcp_server_sqlite,让AI帮你做增删改查!!