HTML5+CSS3前端入门教程---从0开始通过一个商城实例手把手教你学习PC端和移动端页面开发第9章FlexBox实战有路网

简介: HTML5+CSS3前端入门教程---从0开始通过一个商城实例手把手教你学习PC端和移动端页面开发第9章FlexBox实战有路网

本教程案例在线演示


有路网PC端

有路网移动端


免费配套视频教程


免费配套视频教程


教程配套源码资源


教程配套源码资源


制作有路网水平导航菜单


image.png

image

category-nav.css

.red-nav{
  height: 38px;
  background-color: #d80000;
  width: 100%;
}
.red-nav ul{
  display: flex;
  width: 1200px;
  margin: 0 auto;
}
.red-nav li{
  flex: 0 0 auto;
  line-height: 38px;
  font-size: 16px;
  padding: 0 24px;
  font-weight: bold;
}
.red-nav li a{
  color: white;
}
.red-nav li:hover{
  background-color: #c90000;
}
.red-nav li:nth-child(1)
{
  padding-right: 100px;
  padding-left: 20px;
  background-color: #c90000;
}

youlu-category-nav.html

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="reset.css">
  <link rel="stylesheet" href="category-nav.css">
</head>
<body>
  <div class="red-nav">
    <ul>
      <li><a href="#">全部图书分类</a></li>
      <li><a href="#">首页</a></li>
      <li><a href="#">特卖</a></li>
      <li><a href="#">入驻商家</a></li>
      <li><a href="#">文具</a></li>
      <li><a href="#">考试</a></li>
      <li><a href="#">电子书</a></li>
    </ul>
</div>
</body>
</html>


制作有路网搜索栏

image.png

image

制作HTML骨架

<div class="search-bar">
      <div class="logo">
        <img src="img/logo.jpg" />
      </div>
      <div class="search-block">
        <div class="search">
          <form action="#">
            <input type="text" class="input" placeholder="书名" /><input
              type="submit"
              value="搜索"
              class="btn"
            />
          </form>
        </div>
        <div class="hot-search">
          <ul>
            <li>热门搜索:</li>
            <li><a href="#">公务员考试</a></li>
            <li><a href="#">四六级</a></li>
            <li><a href="#">高等数学</a></li>
            <li><a href="#">自考</a></li>
          </ul>
        </div>
      </div>
      <div class="cart">
        <div><a href="#">网站购物车<span>3</span>本</a></div>
        <div><a href="#">店铺购物车<span>0</span>本</a></div>
      </div>
    </div>


image.png

image

美化logo

image.png

image

.search-bar {
        width: 1200px;
        margin: 40px auto 0;
        display: flex;
      }
      .search-bar .logo {
        margin-right: 64px;
      }


美化搜索框

image.png

image

.search-bar .search {
        width: 509px;
        margin: 0 auto;
        height: 40px;
      }
      .search-bar .search .input {
        width: 400px;
        height: 36px;
        border: 2px solid red;
        font-size: 20px;
      }
      .search-bar .search .btn {
        vertical-align: top;
        height: 42px;
        width: 100px;
        margin-left: -3px;
        border: 0px solid black;
        background-color: red;
        color: white;
        font-size: 18px;
        font-weight: bold;
        letter-spacing: 6px;
        cursor: pointer;
      }


美化热门搜索


image.png

image

.search-bar .hot-search li {
        display: inline-block;
        font-size: 16px;
        line-height: 32px;
        font-weight: bold;
        padding: 0px 2px;
      }
      .search-bar .hot-search li a {
        color: gray;
      }
      .search-bar .hot-search li a:hover {
        text-decoration: underline;
        color: orange;
      }


美化购物车

image.png

image

.search-bar .cart {
        background-image: url("img/cart.jpg");
        background-repeat: no-repeat;
        padding-left: 44px;
        line-height: 20px;
        margin-left: auto;
      }
      .search-bar .cart a {
        color: black;
      }
      .search-bar .cart a:hover {
        text-decoration: underline;
      }
      .search-bar .cart span {
        color: red;
        font-weight: bold;
      }

完整代码

searchbar.css

.search-bar{
  width: 1200px;
  margin: 0 auto;
  display: flex;
}
.search-bar .logo{
  margin-right: 154px;
}
.search{
  height: 40px;
  width: 420px;
  margin: 0 auto;
  /* margin-top: 60px; */
}
.search .input{
  border: 3px solid red;
  width: 300px;
  height: 36px;
  font-size: 20px;
}
.search .btn{
  height: 44px;
  width: 100px;
  border:0;
  background-color: red;
  color: white;
  font-size: 18px;
  font-weight: bold;
  margin-left: -4px;
  vertical-align: top;
  letter-spacing: 6px;
}
.search-bar .hot-search li{
  display: inline-block;
  line-height: 32px;
  font-weight: bold;
  padding: 0px 2px;
  font-size: 14px;
}
.search-bar .cart{
  background-image: url('img/cart.jpg');
  background-repeat: no-repeat;
  padding-left: 44px;
  line-height: 20px;
  margin-left: auto;
}
.search-bar .cart span{
  color: red;
  font-weight: bold;
}

youlu-searchbar.html

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="reset.css">
  <link rel="stylesheet" href="searchbar.css">
</head>
<body>
  <div class="search-bar">
    <div class="logo">
      <img src="img/logo.jpg" alt="">
    </div>
    <div class="search-block">
      <div class="search">
        <form action="#">
          <input class="input" type="text" placeholder="书名">
          <input class="btn" type="button" value="搜索">
        </form>
      </div>
      <div class="hot-search">
        <ul>
          <li>热门搜索:</li>
          <li><a href="#">公务员考试</a></li>
          <li><a href="#">四六级</a></li>
          <li><a href="#">高等数学</a></li>
          <li><a href="#">自考</a></li>
        </ul>
      </div>
    </div>
    <div class="cart">
      <div><a href="#">网站购物车<span>0</span>本</a></div>
      <div><a href="#">店铺购物车<span>0</span>本</a></div>
    </div>
  </div>
</body>
</html>


制作有路网推荐图书页面


image.png

image

HTML骨架


imageimage.png

<div class="book-recommend">
      <div class="header">
        <h2>推荐图书</h2>
        <div><span>1</span>/4</div>
      </div>
      <div class="content">
        <ul>
          <li>
            <img src="img/狼图腾.jpg" />
            <div><a href="#">狼图腾(修订版)</a></div>
            <div class="author">姜戎</div>
            <div class="price">
              <span class="discount">¥15.90</span>
              <span class="origin-price">¥39.80</span>
            </div>
          </li>
          <li>
            <img src="img/文化苦旅.jpg" />
            <div><a href="#">狼图腾(修订版)</a></div>
            <div class="author">姜戎</div>
            <div class="price">
              <span class="discount">¥15.90</span>
              <span class="origin-price">¥39.80</span>
            </div>
          </li>
          <li>
            <img src="img/平凡的世界.jpg" />
            <div><a href="#">狼图腾(修订版)</a></div>
            <div class="author">姜戎</div>
            <div class="price">
              <span class="discount">¥15.90</span>
              <span class="origin-price">¥39.80</span>
            </div>
          </li>
          <li>
            <img src="img/偷影子的人.jpg" />
            <div><a href="#">狼图腾(修订版)</a></div>
            <div class="author">姜戎</div>
            <div class="price">
              <span class="discount">¥15.90</span>
              <span class="origin-price">¥39.80</span>
            </div>
          </li>
          <li>
            <img src="img/狼图腾.jpg" />
            <div><a href="#">狼图腾(修订版)5</a></div>
            <div class="author">姜戎</div>
            <div class="price">
              <span class="discount">¥15.90</span>
              <span class="origin-price">¥39.80</span>
            </div>
          </li>
          <li>
            <img src="img/狼图腾.jpg" />
            <div><a href="#">狼图腾(修订版)6</a></div>
            <div class="author">姜戎</div>
            <div class="price">
              <span class="discount">¥15.90</span>
              <span class="origin-price">¥39.80</span>
            </div>
          </li>
          <li>
            <img src="img/蔡永康.jpg" />
            <div><a href="#">狼图腾(修订版)7</a></div>
            <div class="author">姜戎</div>
            <div class="price">
              <span class="discount">¥15.90</span>
              <span class="origin-price">¥39.80</span>
            </div>
          </li>
          <li>
            <img src="img/狼图腾.jpg" />
            <div><a href="#">狼图腾(修订版)</a></div>
            <div class="author">姜戎</div>
            <div class="price">
              <span class="discount">¥15.90</span>
              <span class="origin-price">¥39.80</span>
            </div>
          </li>
        </ul>
      </div>
    </div>

美化头部

image.png

image

.book-recommend {
        width: 750px;
        margin: 100px auto 0px;
      }
      .book-recommend .header {
        border-bottom: 1px solid gray;
        background-image: url("img/laba.jpg");
        background-repeat: no-repeat;
        background-position: 0px 8px;
        display: flex;
      }
      .book-recommend .header div {
        padding-top: 6px;
        padding-right: 6px;
        font-size: 16px;
      }
      .book-recommend .header div span {
        color: red;
      }
      .book-recommend .header h2 {
        margin-right: auto;
        font-size: 22px;
        font-weight: bold;
        padding-left: 20px;
        padding-bottom: 8px;
      }

美化体部大框

image.png

image

.content {
        padding-top: 10px;
      }
      .content div {
        text-align: left;
        padding-left: 30px;
        line-height: 32px;
      }
      .content ul {
        display: flex;
        flex-wrap: wrap;
      }
      .content li {
        width: 187px;
        text-align: center;
      }

美化体部细节

image.png

image

.content .price {
        margin-top: -10px;
        margin-bottom: 20px;
        font-size: 14px;
      }
      .content .price .discount {
        color: red;
        font-weight: bold;
        margin-right: 6px;
      }
      .content .price .origin-price {
        color: gray;
        text-decoration: line-through;
      }
      .content .author {
        color: gray;
      }
      .content li a {
        color: black;
      }
      .content li a:hover {
        color: orange;
        text-decoration: underline;
      }
      .content li img {
        width: auto;
        height: 160px;
      }

完整代码

recommend-books.css

.book-recommend{
  width: 750px;
  margin: 40px auto;
}
.book-recommend .header{
  display: flex;
  border-bottom: 1px solid gray;
  background-image: url('img/laba.jpg');
  background-repeat: no-repeat;
  background-position: 0 6px;
  padding-left: 16px;
  padding-bottom: 6px;
  font-size: 16px;
}
.book-recommend .header h2{
  margin-right: auto;
  font-size: 16px;
}
.book-recommend .header span{
  color: red;
}
.book-recommend .content{
  margin-top: 10px;
}
.book-recommend .content ul{
  display: flex;
  flex-wrap: wrap;
}
.book-recommend .content li{
  width: 187px;
  text-align: center;
  line-height: 24px;
}
.book-recommend .content li .author{
  position: relative;
  left:-36px;
}
.book-recommend .content li img{
  width: auto;
  height: 160px;
}
.book-recommend .content .price{
  margin-bottom: 20px;
}
.book-recommend .content .discount{
  color:red;
  font-weight: bold;
  margin-right: 8px;
}
.book-recommend .content .origin-price{
  text-decoration: line-through;
}

youlu-recommend-books.html

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="reset.css">
  <link rel="stylesheet" href="recommend-books.css">
</head>
<body>
  <div class="book-recommend">
    <div class="header">
      <h2>推荐图书</h2>
      <div><span>1</span>/4</div>
    </div>
    <div class="content">
      <ul>
        <li>
          <img src="img/狼图腾.jpg" />
          <div><a href="#">狼图腾(修订版)</a></div>
          <div class="author">姜戎</div>
          <div class="price">
            <span class="discount">¥15.90</span>
            <span class="origin-price">¥39.80</span>
          </div>
        </li>
        <li>
          <img src="img/文化苦旅.jpg" />
          <div><a href="#">狼图腾(修订版)</a></div>
          <div class="author">姜戎</div>
          <div class="price">
            <span class="discount">¥15.90</span>
            <span class="origin-price">¥39.80</span>
          </div>
        </li>
        <li>
          <img src="img/平凡的世界.jpg" />
          <div><a href="#">狼图腾(修订版)</a></div>
          <div class="author">姜戎</div>
          <div class="price">
            <span class="discount">¥15.90</span>
            <span class="origin-price">¥39.80</span>
          </div>
        </li>
        <li>
          <img src="img/偷影子的人.jpg" />
          <div><a href="#">狼图腾(修订版)</a></div>
          <div class="author">姜戎</div>
          <div class="price">
            <span class="discount">¥15.90</span>
            <span class="origin-price">¥39.80</span>
          </div>
        </li>
        <li>
          <img src="img/狼图腾.jpg" />
          <div><a href="#">狼图腾(修订版)5</a></div>
          <div class="author">姜戎</div>
          <div class="price">
            <span class="discount">¥15.90</span>
            <span class="origin-price">¥39.80</span>
          </div>
        </li>
        <li>
          <img src="img/狼图腾.jpg" />
          <div><a href="#">狼图腾(修订版)6</a></div>
          <div class="author">姜戎</div>
          <div class="price">
            <span class="discount">¥15.90</span>
            <span class="origin-price">¥39.80</span>
          </div>
        </li>
        <li>
          <img src="img/蔡永康.jpg" />
          <div><a href="#">狼图腾(修订版)7</a></div>
          <div class="author">姜戎</div>
          <div class="price">
            <span class="discount">¥15.90</span>
            <span class="origin-price">¥39.80</span>
          </div>
        </li>
        <li>
          <img src="img/狼图腾.jpg" />
          <div><a href="#">狼图腾(修订版)</a></div>
          <div class="author">姜戎</div>
          <div class="price">
            <span class="discount">¥15.90</span>
            <span class="origin-price">¥39.80</span>
          </div>
        </li>
      </ul>
    </div>
  </div>
</body>
</html>

制作有路网近期热销榜

image.png

image

HTML骨架

image.png

image

<div class="hot">
      <h2>近期热销榜</h2>
      <ul>
        <li>
          <div class="book1">
            <span class="red">1</span>如果蜗牛有爱情(上下
          </div>
          <div class="book2">
            <div><span class="red">1</span></div>
            <div><img src="img/萤火虫小巷.jpg" /></div>
            <div>
              <p class="title">萤火虫小巷</p>
              <p class="discount-price">¥14.40</p>
              <p class="old-price">¥36.00</p>
            </div>
          </div>
        </li>
        <li>
          <div class="book1">
            <span class="red">1</span>如果蜗牛有爱情(上下
          </div>
          <div class="book2">
            <div><span class="red">1</span></div>
            <div><img src="img/萤火虫小巷.jpg" /></div>
            <div>
              <p class="title">萤火虫小巷</p>
              <p class="discount-price">¥14.40</p>
              <p class="old-price">¥36.00</p>
            </div>
          </div>
        </li>
        <li>
          <div class="book1">
            <span class="red">1</span>如果蜗牛有爱情(上下
          </div>
          <div class="book2">
            <div><span class="red">1</span></div>
            <div><img src="img/萤火虫小巷.jpg" /></div>
            <div>
              <p class="title">萤火虫小巷</p>
              <p class="discount-price">¥14.40</p>
              <p class="old-price">¥36.00</p>
            </div>
          </div>
        </li>
        <li>
          <div class="book1"><span>4</span>如果蜗牛有爱情(上下</div>
          <div class="book2">
            <div><span>4</span></div>
            <div><img src="img/萤火虫小巷.jpg" /></div>
            <div>
              <p class="title">萤火虫小巷</p>
              <p class="discount-price">¥14.40</p>
              <p class="old-price">¥36.00</p>
            </div>
          </div>
        </li>
        <li>
          <div class="book1"><span>4</span>如果蜗牛有爱情(上下</div>
          <div class="book2">
            <div><span>1</span></div>
            <div><img src="img/萤火虫小巷.jpg" /></div>
            <div>
              <p class="title">萤火虫小巷</p>
              <p class="discount-price">¥14.40</p>
              <p class="old-price">¥36.00</p>
            </div>
          </div>
        </li>
        <li>
          <div class="book1"><span>4</span>如果蜗牛有爱情(上下</div>
          <div class="book2">
            <div><span>1</span></div>
            <div><img src="img/萤火虫小巷.jpg" /></div>
            <div>
              <p class="title">萤火虫小巷</p>
              <p class="discount-price">¥14.40</p>
              <p class="old-price">¥36.00</p>
            </div>
          </div>
        </li>
        <li>
          <div class="book1"><span>4</span>如果蜗牛有爱情(上下</div>
          <div class="book2">
            <div><span>1</span></div>
            <div><img src="img/萤火虫小巷.jpg" /></div>
            <div>
              <p class="title">萤火虫小巷</p>
              <p class="discount-price">¥14.40</p>
              <p class="old-price">¥36.00</p>
            </div>
          </div>
        </li>
        <li>
          <div class="book1"><span>4</span>如果蜗牛有爱情(上下</div>
          <div class="book2">
            <div><span>1</span></div>
            <div><img src="img/萤火虫小巷.jpg" /></div>
            <div>
              <p class="title">萤火虫小巷</p>
              <p class="discount-price">¥14.40</p>
              <p class="old-price">¥36.00</p>
            </div>
          </div>
        </li>
        <li>
          <div class="book1"><span>4</span>如果蜗牛有爱情(上下</div>
          <div class="book2">
            <div><span>1</span></div>
            <div><img src="img/萤火虫小巷.jpg" /></div>
            <div>
              <p class="title">萤火虫小巷</p>
              <p class="discount-price">¥14.40</p>
              <p class="old-price">¥36.00</p>
            </div>
          </div>
        </li>
        <li>
          <div class="book1"><span>4</span>如果蜗牛有爱情(上下</div>
          <div class="book2">
            <div><span>1</span></div>
            <div><img src="img/萤火虫小巷.jpg" /></div>
            <div>
              <p class="title">萤火虫小巷</p>
              <p class="discount-price">¥14.40</p>
              <p class="old-price">¥36.00</p>
            </div>
          </div>
        </li>
      </ul>
    </div>

美化列表展示


image.png

image

.hot {
        width: 220px;
      }
      .hot h2 {
        font-size: 16px;
        line-height: 40px;
        padding-left: 34px;
      }
      .hot ul {
        border: 1px solid gray;
        font-size: 14px;
      }
      .hot li .book1 {
        line-height: 44px;
        border-bottom: 1px dashed gray;
        padding-left: 14px;
      }
      .hot li span {
        margin-right: 6px;
        font-weight: bold;
      }
      .hot .red {
        color: red;
      }
      .hot .book2 {
        display: none;
      }

美化图文列表展示

image.png

image

.hot .book1 {
        display: none;
      }
      .hot .book2 {
              display: flex;
        height: 102px;
        border-bottom: 1px dashed gray;
      }
      .hot .book2 div {
        margin-top: 6px;
      }
      .hot .book2 img {
        width: 76px;
      }
      .hot .book2 span {
        margin-left: 10px;
        display: inline-block;
        margin-top: 6px;
      }
      .hot .book2 .title {
        font-size: 14px;
        margin-bottom: 22px;
      }
      .hot .book2 .discount-price {
        font-size: 16px;
        font-weight: bold;
        color: red;
      }
      .hot .book2 .old-price {
        font-size: 14px;
        color: gray;
        text-decoration: line-through;
      }

hover切换视图显示

.hot .book2 {
        display: none;
      }
      .hot li:hover .book1 {
        display: none;
      }
      .hot li:hover .book2 {
        display: flex;
      }

完整代码

hot.css

.hot{
  width: 220px;
}
.hot h2{
  font-size: 16px;
  line-height: 40px;
  padding-left: 30px;
}
.hot ul{
  border: 1px solid gray;
  font-size: 14px;
}
.hot .book2{
  display: none;
}
.hot .book1{
  line-height: 44px;
  border-bottom: 1px solid gray;
  padding-left: 14px;
}
.hot span{
  margin-right: 8px;
  font-weight: bold;
}
.hot .red{
  color:red;
}
.hot .book2{
  padding-top: 6px;
  height: 90px;
  border-bottom: 1px solid gray;
}
.hot img{
  width: 76px;
}
.hot .book2 p{
  line-height: 24px;
  font-size: 14px;
}
.hot .discount-price{
  color:red;
}
.hot .old-price{
  text-decoration: line-through;
}
.hot .book2{
  display: none;
}
.hot li:hover .book1{
  display: none;
}
.hot li:hover .book2{
  display: flex;
}

youlu-hot.html

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="reset.css">
  <link rel="stylesheet" href="hot.css">
</head>
<body>
  <div class="hot">
    <h2>近期热销榜</h2>
    <ul>
      <li>
        <div class="book1">
          <span class="red">1</span>如果蜗牛有爱情(上下
        </div>
        <div class="book2">
          <div><span class="red">1</span></div>
          <div><img src="img/萤火虫小巷.jpg" /></div>
          <div>
            <p class="title">萤火虫小巷</p>
            <p class="discount-price">¥14.40</p>
            <p class="old-price">¥36.00</p>
          </div>
        </div>
      </li>
      <li>
        <div class="book1">
          <span class="red">1</span>如果蜗牛有爱情(上下
        </div>
        <div class="book2">
          <div><span class="red">1</span></div>
          <div><img src="img/萤火虫小巷.jpg" /></div>
          <div>
            <p class="title">萤火虫小巷</p>
            <p class="discount-price">¥14.40</p>
            <p class="old-price">¥36.00</p>
          </div>
        </div>
      </li>
      <li>
        <div class="book1">
          <span class="red">1</span>如果蜗牛有爱情(上下
        </div>
        <div class="book2">
          <div><span class="red">1</span></div>
          <div><img src="img/萤火虫小巷.jpg" /></div>
          <div>
            <p class="title">萤火虫小巷</p>
            <p class="discount-price">¥14.40</p>
            <p class="old-price">¥36.00</p>
          </div>
        </div>
      </li>
      <li>
        <div class="book1"><span>4</span>如果蜗牛有爱情(上下</div>
        <div class="book2">
          <div><span>4</span></div>
          <div><img src="img/萤火虫小巷.jpg" /></div>
          <div>
            <p class="title">萤火虫小巷</p>
            <p class="discount-price">¥14.40</p>
            <p class="old-price">¥36.00</p>
          </div>
        </div>
      </li>
      <li>
        <div class="book1"><span>4</span>如果蜗牛有爱情(上下</div>
        <div class="book2">
          <div><span>1</span></div>
          <div><img src="img/萤火虫小巷.jpg" /></div>
          <div>
            <p class="title">萤火虫小巷</p>
            <p class="discount-price">¥14.40</p>
            <p class="old-price">¥36.00</p>
          </div>
        </div>
      </li>
      <li>
        <div class="book1"><span>4</span>如果蜗牛有爱情(上下</div>
        <div class="book2">
          <div><span>1</span></div>
          <div><img src="img/萤火虫小巷.jpg" /></div>
          <div>
            <p class="title">萤火虫小巷</p>
            <p class="discount-price">¥14.40</p>
            <p class="old-price">¥36.00</p>
          </div>
        </div>
      </li>
      <li>
        <div class="book1"><span>4</span>如果蜗牛有爱情(上下</div>
        <div class="book2">
          <div><span>1</span></div>
          <div><img src="img/萤火虫小巷.jpg" /></div>
          <div>
            <p class="title">萤火虫小巷</p>
            <p class="discount-price">¥14.40</p>
            <p class="old-price">¥36.00</p>
          </div>
        </div>
      </li>
      <li>
        <div class="book1"><span>4</span>如果蜗牛有爱情(上下</div>
        <div class="book2">
          <div><span>1</span></div>
          <div><img src="img/萤火虫小巷.jpg" /></div>
          <div>
            <p class="title">萤火虫小巷</p>
            <p class="discount-price">¥14.40</p>
            <p class="old-price">¥36.00</p>
          </div>
        </div>
      </li>
      <li>
        <div class="book1"><span>4</span>如果蜗牛有爱情(上下</div>
        <div class="book2">
          <div><span>1</span></div>
          <div><img src="img/萤火虫小巷.jpg" /></div>
          <div>
            <p class="title">萤火虫小巷</p>
            <p class="discount-price">¥14.40</p>
            <p class="old-price">¥36.00</p>
          </div>
        </div>
      </li>
      <li>
        <div class="book1"><span>4</span>如果蜗牛有爱情(上下</div>
        <div class="book2">
          <div><span>1</span></div>
          <div><img src="img/萤火虫小巷.jpg" /></div>
          <div>
            <p class="title">萤火虫小巷</p>
            <p class="discount-price">¥14.40</p>
            <p class="old-price">¥36.00</p>
          </div>
        </div>
      </li>
    </ul>
  </div>
</body>
</html>


目录
相关文章
|
18天前
|
存储 移动开发 编解码
基于HTML5开发的Markdown在线编辑器
Markdown是一种轻量级标记语言,以其简洁易读的格式而备受程序员和作者们的青睐。随着互联网的发展,越来越多的在线Markdown编辑器应运而生,为用户提供了更加便捷、高效的写作和编辑环境。本文将探讨基于HTML5开发的Markdown在线编辑器的设计原理、功能特点以及技术优势。
52 4
|
1月前
|
关系型数据库 MySQL
web简易开发(二){html5+php实现文件上传及通过关键字搜索已上传图片)}
web简易开发(二){html5+php实现文件上传及通过关键字搜索已上传图片)}
|
8天前
|
缓存 移动开发 前端开发
在PWA的开发中,HTML与CSS作为前端技术的基础,发挥着至关重要的作用
【6月更文挑战第14天】PWA(渐进式网页应用)借助HTML和CSS,提供接近原生应用的体验。HTML构建页面结构和内容,响应式设计适应各种设备,语义化标签提升可访问性,Manifest文件配置应用元数据,离线页面保证无网时体验。CSS则用于定制主题样式,创建动画效果,实现响应式布局,并管理字体和图标。两者协同工作,确保PWA在不同环境下的优秀性能和用户体验。随着前端技术进步,HTML与CSS在PWA中的应用将更加深入。
19 2
|
30天前
|
存储 移动开发 编解码
基于HTML5开发的Markdown在线编辑器
Markdown是一种轻量级标记语言,以其简洁易读的格式而备受程序员和作者们的青睐。随着互联网的发展,越来越多的在线Markdown编辑器应运而生,为用户提供了更加便捷、高效的写作和编辑环境。本文将探讨基于HTML5开发的Markdown在线编辑器的设计原理、功能特点以及技术优势。
33 1
基于HTML5开发的Markdown在线编辑器
|
28天前
|
XML 前端开发 JavaScript
学习css
【5月更文挑战第25天】学习css
20 1
|
1月前
|
移动开发 前端开发 JavaScript
:掌握移动端开发:HTML5 与 CSS3 的高效实践
:掌握移动端开发:HTML5 与 CSS3 的高效实践 “【5月更文挑战第6天】”
39 1
|
1月前
|
前端开发 JavaScript UED
【专栏:HTML与CSS移动端开发篇】移动端触摸事件与手势识别
【4月更文挑战第30天】本文探讨了移动端触摸事件和手势识别在网页开发中的重要性。介绍了基础触摸事件如`touchstart`, `touchmove`, `touchend`, `touchcancel`及相关属性。文章列举了处理触摸事件的方法,包括单点触摸、多点触摸、滑动、长按、捏合缩放、旋转检测和事件代理。建议使用第三方库如Hammer.js简化手势处理,并分享了最佳实践,如避免意外触摸、提供视觉反馈、考虑性能和跨设备测试。理解并有效利用这些技术能提升用户交互体验。
|
1月前
|
缓存 前端开发 JavaScript
【专栏:HTML与CSS移动端开发篇】移动端网页性能优化策略
【4月更文挑战第30天】本文探讨了移动端网页性能优化的重要性,并提出了优化策略。HTML方面,建议精简结构、使用语义化标签、异步加载脚本和压缩文件;CSS优化包括精简样式、使用CSS3动画、媒体查询和压缩文件。其他策略涉及图片和字体压缩、缓存利用、数据压缩、减少HTTP请求及根据网络状态调整加载。综合运用这些策略能提升网页性能和用户体验。
|
1月前
|
编解码 前端开发 UED
【专栏:HTML 与 CSS 移动端开发篇】CSS 媒体查询与移动端特定样式
【4月更文挑战第30天】CSS媒体查询在移动端开发中至关重要,它基于设备特性(如屏幕尺寸、分辨率、方向)应用特定样式,实现响应式设计。通过`@media`规则定义条件,如`(max-width: 600px)`,当屏幕宽度小于或等于600px时应用相应样式。常见条件包括屏幕宽度、高度、方向和分辨率。媒体查询可用于响应式布局、导航菜单优化、图片加载及字体调整。在实践中,需注意保持查询简洁,充分测试,渐进增强,并提前规划。掌握媒体查询能提升移动端用户体验,创造更优秀的网页设计。
|
移动开发 JavaScript HTML5
HTML5商城开发四 多图或多商品的水平滚动展示
一、效果图   二、实现 样式: .horz_scroll { float: left; width: 20px; height: 130px; padding-top: 100px; padding-left: 15px; ...
1004 0