Web實驗一 國內旅游界面

来源:https://www.cnblogs.com/jiufang/archive/2020/03/10/12459362.html
-Advertisement-
Play Games

Web實驗一 旅游界面的設計 一、首頁代碼 1 <!DOCTYPE html> 2 <html lang="zh-cn"> 3 <head> 4 <meta charset="utf-8"> 5 <title>國內旅游</title> 6 <link href="css/common.css" re ...


  • Web實驗一  旅游界面的設計

一、首頁代碼

 1 <!DOCTYPE html>
 2 <html lang="zh-cn">
 3 <head>
 4     <meta charset="utf-8">
 5     <title>國內旅游</title>
 6     <link href="css/common.css" rel="stylesheet" type="text/css">
 7     <link href="css/main.css" rel="stylesheet" type="text/css">
 8 </head>
 9 <body>
10 <section class="qui-page">
11     <header class="qui-header">
12         <h1>國內旅游計劃</h1>
13     </header>
14     <section class="container">
15         <div class="plcRouteList">
16             <a herf=""><img src="image/fengjing.jpg" width="100%"alt=""class="pic"></a>
17             <div class="bottom">
18                 <p class="face"><img src="image/touxiang.jpg "width="38" height="38"alt=""></p>
19            <h2 class="title">我的旅游行程</h2>
20             </div>
21             <p class="day">14天</p>
22             <div class="infos">
23 
24             <div>
25             <em>城市</em>
26             <p>昆明-香格裡拉-西藏</p>
27         </div>
28            </div>
29         </div>
30     </section>
31     <section class="container">
32         <div class="plcRouteList">
33             <a herf=""><img src="image/fengjing.jpg" width="100%"alt=""class="pic"></a>
34             <div class="bottom">
35                 <p class="face"><img src="image/touxiang.jpg"width="38" height="38"alt=""></p>
36                 <h2 class="title">我的旅游行程</h2>
37             </div>
38             <p class="day">15天</p>
39             <div class="infos">
40                 <div>
41 
42               <em>城市</em>
43             <p>北京-常州-蘇州</p>
44                 </div>
45             </div>
46         </div>
47     </section>
48 
49     <footer class="qui-footerBasic">
50         <p class="switchStyle">
51             <span>手機版</span>
52             <a href="">
53                 <span>電腦版</span>
54             </a>
55             <span><a href="">APP</a></span>
56 
57         </p>
58     </footer>
59 
60 </section>
61 <aside class="qui-asides">
62     <section class="qui-aside">
63         <nav class="qui-asideNav">
64             <ul>
65                 <li><a href="">首頁</a></li>
66                 <li><a href="">目的地</a></li>
67                 <li><a href="">酒店</a></li>
68                 <li><a href="">機票</a></li>
69                 <li><a href="">時間</a></li>
70                 <li><a href="">點評</a></li>
71             </ul>
72         </nav>
73     </section>
74 </aside>
75 </body>
76 </html>

二、css樣式

common.css

 1 /*旅游管理頁面*/
 2 html{
 3     height:100%;
 4     overflow-x: hidden;/*表示水平方向隱藏溢出,沒有滾動條*/
 5     background: #f5f5f5;
 6     color: #444;
 7     font: 14px/24px Helvetica !important;/*字體樣式:字型大小大小14px ,行高24px,字體 Hel ,!important 字體樣式為最高權值;*/
 8 
 9 }
10 body{
11     -webkit-box-sizing: border-box;
12     -moz-box-sizing: border-box;
13     box-sizing: border-box;
14     position: relative;
15     z-index: 0;
16     max-width: 640px;
17     min-height: 100%;
18     margin: 0 auto;
19     overflow-x: hidden;
20     box-shadow: 0 0 10px rgba(0 0 0 0.3) ;
21 }
22     div,ul,li,p{
23         margin: 0;
24         padding: 0;
25         outline: none;
26     }
27     em , strong {
28         font-style: normal;
29         font-weight:normal;
30     }
31     ul{ list-style: none;
32     }
33     h1{
34         font-size: 55px;
35         margin-top: 30px;
36         color: white;
37         text-align: center;
38     }

Main.css

  1 .qui-page{
  2     width: 640px;
  3 
  4 }
  5 .qui-header {
  6     width: 100%;
  7     height: 80px;
  8     overflow: hidden;
  9     background-color: #2bab79;
 10 
 11 }
 12 .container {
 13     width: 100%;
 14     -webkit-box-sizing: border-box;
 15     -moz-box-sizing:border-box  ;
 16     box-sizing: border-box;
 17 }
 18 .plcRouteList {
 19     border-bottom:  1px solid #e6e8ea;
 20     background-color: #fff;
 21    padding-left: 5px;
 22     position: relative;
 23 }
 24 .plcRouteList  a {
 25     display: block;
 26     position: relative;
 27 }
 28 .plcRouteList  pic{
 29     display: block;
 30     min-height: 150px;
 31 }
 32 .plcRouteList  .bottom {
 33     position: absolute;
 34     left:5px;
 35     right:0;
 36     bottom:35px ;
 37     height:  50px;
 38     padding:  30px 0 0 60px;
 39     color:#fff;
 40     background-image: -webkit-linear-gradient(top ,rgba(0,0,0,0),rgba(0,0,0,0.6) ) ;
 41 
 42 
 43 }
 44 .plcRouteList  .bottom  .face {
 45     float:left;
 46     margin-left: -50px;
 47     width:38px;
 48     height:38px;
 49     border-radius: 50%;
 50     border: 1px solid #fff;
 51     overflow:hidden;
 52 
 53 
 54 }
 55 .plcRouteList  .bottom  .title{
 56     width:100%;
 57     overflow:hidden;
 58     text-overflow: ellipsis;
 59     white-space: nowrap;
 60     font-size: 18px;
 61     font-weight: bold;
 62     line-height: 22px;
 63 }
 64 .plcRouteList  .day{
 65     position: absolute;
 66     top:  10px;
 67     right: 10px;
 68     width: 50px;
 69     height: 50px;
 70     background-color: rgba(43,171,121,0.8) ;
 71     boderder-radiu:50%;
 72     text-align: center ;
 73     font-size: 18px;
 74     line-height: 50px;
 75     color:#fff;
 76 
 77 }
 78 .plcRouteList  .infos {
 79     margin-top: 7px;
 80 }
 81 .plcRouteList .infos >div{
 82     margin-bottom: 5px;
 83     padding-left: 40px;
 84 }
 85 .plcRouteList  .infos em{
 86     float: left;
 87     margin-left:  -40px;
 88     font-size: 15px;
 89     font-weight: bold;
 90  }
 91 .plcRouteList  .infos  p{
 92     max-height: 48px;
 93     overflow: hidden;
 94 }
 95 
 96 .qui-footerBasic {
 97     width: 100%;
 98     margin: 20px 0;
 99     text-align: center ;
100     font-size: 10px;
101     line-height: 20px;
102 
103 }
104 .qui-footerBasic .switchStyle {
105     color:#9ea3ab ;
106 
107 }
108 .qui-footerBasic  .switchStyle  span{
109     margin-left:30px ;
110 }
111 .qui-footerBasic .switchStyle a{
112     color:#444 ;
113     text-decoration:none ;
114 
115 }
116 .qui-asides {
117     position: absolute;
118     left: -150px;
119     top: 0;
120     height:400px;
121     width: 200px;
122 }
123 .qui-aside{
124     position: fixed;
125     top:0px;
126     width: 150px;
127     overflow-y: scroll;
128     background-color: #2d3741;
129 
130 }
131 .qui-asideNav {
132     padding:  40px 10px 1000px;
133 
134 }
135 .qui-asideNav li{
136     border-top:  1px solid #232d34;
137     background-color:#36424b ;
138 
139 }
140 .qui-asideNav a{
141     text-decoration:  none;
142     display: block;
143     padding-left:15px;
144     font-size:16px ;
145     line-height:  44px;
146     color: #ced1d5;
147 }
148 .qui-asideNav a:hover{
149     color:white;
150     background-color:#2bab79;
151 }

Imag

三、效果圖

    

三、效果圖

四、實驗總結

css與代碼對接容易出錯,編寫時應註意細節上的調整,css的緊密性體現在效果的細節上,如果沒有出現預期的效果應多檢查檢查效果的css,另外養成一個好的習慣也很重要,勤寫註釋可以有助後期的修改。

 

 

 

 

 

 


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 前言 .Net目前支持構建伺服器端應用程式的兩種實現主要有兩種,.NET Framework和.NET Core。兩者共用許多相同的組件,並且您可以在兩者之間共用代碼。但是,兩者之間存在根本差異,在我們選擇使用哪種框架構建應用時,您的選擇取決於您要完成的工作,以下說明兩種框架的應用場景,希望能夠幫助 ...
  • 一.操作資料庫 1.查看所有資料庫 : show databases; 2.創建資料庫 : create database name(資料庫名); 3.刪除資料庫 : drop database name(資料庫名); 4.連接資料庫 : use name(資料庫名); 二.操作表 1.查看所有表 ...
  • 註意:無特殊說明,Flutter版本及Dart版本如下: Flutter版本: 1.12.13+hotfix.5 Dart版本: 2.7.0 Draggable系列組件可以讓我們拖動組件。 Draggable Draggable組件有2個必須填寫的參數, 參數是子控制項, 參數是拖動時跟隨移動的組件, ...
  • <script>標簽要成對出現,並把JavaScript代碼寫在<script></script>之間。尤其註意的是<script type="text/javascript">表示在<script></script>之間的是文本類型(text),javascript是為了告訴瀏覽器裡面的文本是屬於... ...
  • canvas預設寬高是300*150px <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>canvas</title> <style> .canvas{border:1px solid pink;} </st ...
  • 資料: "js 世界 數組去重到底最快的是誰?" [Remove duplicate values from JS array [duplicate] ](https://stackoverflow.com/questions/9229645/remove duplicate values from ...
  • 你知道,為什麼JavaScript非常值得我們學習嗎?1.所有的主流瀏覽器都支持javascript;2.大部分網頁都使用javascript;3.它可以讓網頁呈現出各種動態效果4.作為一個web開發師,如果你想提供漂亮的網頁,擁有讓我用戶滿意的上網體驗,js必不可少。二、javascript入門檻... ...
  • 預設的瀏覽器氣泡樣式: 谷歌瀏覽器 火狐瀏覽器 IE瀏覽器 在谷歌29版本之前可以使用偽元素進行修改: ::-webkit-validation-bubble 不過已被廢棄!!! 新的解決方案: 效果圖: <!DOCTYPE html> <html lang="en"> <head> <meta c ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...