index 首页
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="css/index.css"/>
</head>
<body>
<div class="content">
<div class="banner">
<img src="img/banner/1.jpg" id="myimg">
</div>
<div class="star">
<div class="tilte"></div>
<ul>
<li><img src="img/necessary-1.png" alt=""><span>官方应援手灯专区</span></li>
<li><img src="img/necessary-2.gif" alt=""><span>官方应援手福专区</span></li>
<li><img src="img/necessary-3.png" alt=""><span>签名商品专区</span></li>
<li><img src="img/necessary-4.gif" alt=""><span>官方DVD专区</span></li>
<li><img src="img/special.jpg" alt=""></li>
</ul>
</div>
<div class="top">
<div class="title"></div>
<ul>
<li><a href="list.html"><img src="img/top/a/toplist_a01.jpg" alt=""></a><span>薛之谦</span></li>
<li><a href="list.html"><img src="img/top/a/toplist_a02.jpg" alt=""></a><span>IKON</span></li>
<li><a href="list.html"><img src="img/top/a/toplist_a03.jpg" alt=""></a><span>鹿晗</span></li>
<li><a href="list.html"><img src="img/top/a/toplist_a04.jpg" alt=""></a><span>GOT7</span></li>
<li><a href="list.html"><img src="img/top/a/toplist_a05.jpg" alt=""></a><span>EXO</span></li>
<li><a href="list.html"><img src="img/top/a/toplist_a06.jpg" alt=""></a><span>Astro(韩国)</span></li>
<li><a href="list.html"><img src="img/top/a/toplist_a07.jpg" alt=""></a><span>Winner</span></li>
<li><a href="list.html"><img src="img/top/a/toplist_a08.jpg" alt=""></a><span>BigBang</span></li>
</ul>
</div>
<div class="list">
<div class="title"> </div>
<!-- ul>(li>img[src=img/pro/$.jpg]+div.right>span.title+span.money+div>span.love+span.num)*9 -->
<ul>
<li>
<img src="img/pro/1.jpg" alt="">
<div class="right">
<span class="title">[现货包邮]加一联创 Imore bear 万魔熊 头</span>
<span class="money">¥50</span>
<div><span class="love"></span><span class="num">0</span></div>
</div>
</li>
<li>
<img src="img/pro/2.jpg" alt="">
<div class="right">
<span class="title">[现货包邮]加一联创 Imore bear 万魔熊 头</span>
<span class="money">¥50</span>
<div><span class="love"></span><span class="num">0</span></div>
</div>
</li>
<li>
<img src="img/pro/3.jpg" alt="">
<div class="right">
<span class="title">[现货包邮]加一联创 Imore bear 万魔熊 头</span>
<span class="money">¥50</span>
<div><span class="love"></span><span class="num">0</span></div>
</div>
</li>
<li>
<img src="img/pro/4.jpg" alt="">
<div class="right">
<span class="title">[现货包邮]加一联创 Imore bear 万魔熊 头</span>
<span class="money">¥50</span>
<div><span class="love"></span><span class="num">0</span></div>
</div>
</li>
<li>
<img src="img/pro/5.jpg" alt="">
<div class="right">
<span class="title">[现货包邮]加一联创 Imore bear 万魔熊 头</span>
<span class="money">¥50</span>
<div><span class="love"></span><span class="num">0</span></div>
</div>
</li>
<li>
<img src="img/pro/6.jpg" alt="">
<div class="right">
<span class="title">[现货包邮]加一联创 Imore bear 万魔熊 头</span>
<span class="money">¥50</span>
<div><span class="love"></span><span class="num">0</span></div>
</div>
</li>
<li>
<img src="img/pro/7.jpg" alt="">
<div class="right">
<span class="title">[现货包邮]加一联创 Imore bear 万魔熊 头</span>
<span class="money">¥50</span>
<div><span class="love"></span><span class="num">0</span></div>
</div>
</li>
<li>
<img src="img/pro/8.jpg" alt="">
<div class="right">
<span class="title">[现货包邮]加一联创 Imore bear 万魔熊 头</span>
<span class="money">¥50</span>
<div><span class="love"></span><span class="num">0</span></div>
</div>
</li>
<li>
<img src="img/pro/9.jpg" alt="">
<div class="right">
<span class="title">[现货包邮]加一联创 Imore bear 万魔熊 头</span>
<span class="money">¥50</span>
<div><span class="love"></span><span class="num">0</span></div>
</div>
</li>
</ul>
</div>
</div>
<div class="type2" >
<img src="img/footer_v180123.png" >
</div>
<script type="text/javascript">
window.onload=function(){
var myImg=document.getElementById("myimg");
var arr=["img/banner/1.jpg","img/banner/2.jpg","img/banner/3.jpg","img/banner/4.jpg"];
var n=0;
setInterval(function(){
n++;
if(n==arr.length){
n=0;
}
myImg.src=arr[n];
},1000);
}
</script> </body>
</html>
body{
background-color: #CCCCCC;
} .content ul{
padding: 0px;
margin: 0px;
}
.content ul li{
display: inline-block;
}
.content{
width: 1000px;
margin: 0 auto;
}
.content .banner img{
width: 1000px;
}
.content .star{
margin-top: 20px;
}
.content .star .tilte{
background-image:url(../img/zhuxing.png);
background-repeat: no-repeat;
height: 45px;
}
.content .star li {
background-color: white;
vertical-align: bottom;
/*vertical-align: bottom(底部)水平对齐*/
}
.content .star li:last-child {
height: 135px;
margin-left: 20px;
}
.content .star li:last-child{
background-color:#CCCCCC;
}
.content .star li:last-child img {
height: 124px;
width: 240px;
margin-top: 10px;
}
.content .star li img{
width: 180px;
}
.content .star li span{
display: block;
text-align: center;
padding: 5px;
height: 20px;
line-height: 20px;
color: #999999;
font-size: 12px;
}
.content .top{
margin-top:20px ;
}
.content .top .title{
height: 40px;
background-image: url(../img/shop_title2.png);
background-repeat: no-repeat;
background-position: 0 -60px;
}
.content .top li{
margin: 0 3px;
width: 115px;
background-color: #FFFFFF; }
.content .top li:first-child{
margin-left: 0;
}
.content .top li:last-child{
margin-right: 0;
}
.content .top img{
width: 115px;
}
.content .top span{
display: block;
text-align: center;
line-height: 30px;
height: 30px;
width: 115px;
font-size: 14px;
padding: 5px;
}
/* .content .top span:nth-child(6){
margin-left: 10px;
} */
.content .list li{
background-color: #FFFFFF;
width: 322px;
margin: 10px 5px;
height: 154px;
} .content .list li:nth-child(3n+1){
margin-left: 0;
}
.content .list li:nth-child(3n){
margin-right: 0;
}
.content .list img{
height: 154px;
width: 154px;
}
.content .list .right span{
display: block;
color: #999;
margin: 10px 5px;
width: 150px;
font-size: 14px;
height: 40px;
overflow: hidden;
}
.content .list .right{
display:inline-block;
vertical-align: top;
}
.content .list .right .title{
/* margin-top: 30px; */
margin-top: 30px;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.content .list .right .money{
color: #DE4767;
}
.content .list .right div span{
display: inline-block;
}
.content .list .right div {
margin-top: -7px;
}
.content .list .right .love{
width: 12px;
height: 12px;
background-image: url(../img/icon/ico.png);
background-repeat: no-repeat;
background-position:0 -74px;
margin-top: 0px;
}
.content .list .right .num{
width: 100px;
margin-top: -6px;
vertical-align: top;
}
.type2{
background-color: #FFFFFF;
margin-top: 10px;
height: 60px;
/* line-height: 80px; */
/* margin: auto; */
}
.type2 img{
margin-top: 5px;
margin-left: 250px;
width: 1000px;
}
ul>(li>img[src=img/pro/$.jpg]+div.right>span.title+span.money+div>span.love+span.num)*9
<ul>
<li>
<img src="img/pro/1.jpg" alt="">
<div class="right">
<span class="title"></span>
<span class="money"></span>
<div><span class="love"></span><span class="num"></span></div>
</div>
</li>
<li>
<img src="img/pro/2.jpg" alt="">
<div class="right">
<span class="title"></span>
<span class="money"></span>
<div><span class="love"></span><span class="num"></span></div>
</div>
</li>
<li>
<img src="img/pro/3.jpg" alt="">
<div class="right">
<span class="title"></span>
<span class="money"></span>
<div><span class="love"></span><span class="num"></span></div>
</div>
</li>
<li>
<img src="img/pro/4.jpg" alt="">
<div class="right">
<span class="title"></span>
<span class="money"></span>
<div><span class="love"></span><span class="num"></span></div>
</div>
</li>
<li>
<img src="img/pro/5.jpg" alt="">
<div class="right">
<span class="title"></span>
<span class="money"></span>
<div><span class="love"></span><span class="num"></span></div>
</div>
</li>
<li>
<img src="img/pro/6.jpg" alt="">
<div class="right">
<span class="title"></span>
<span class="money"></span>
<div><span class="love"></span><span class="num"></span></div>
</div>
</li>
<li>
<img src="img/pro/7.jpg" alt="">
<div class="right">
<span class="title"></span>
<span class="money"></span>
<div><span class="love"></span><span class="num"></span></div>
</div>
</li>
<li>
<img src="img/pro/8.jpg" alt="">
<div class="right">
<span class="title"></span>
<span class="money"></span>
<div><span class="love"></span><span class="num"></span></div>
</div>
</li>
<li>
<img src="img/pro/9.jpg" alt="">
<div class="right">
<span class="title"></span>
<span class="money"></span>
<div><span class="love"></span><span class="num"></span></div>
</div>
</li>
</ul>
- display:block -- 显示为块级元素
- display:inline -- 显示为内联元素
- display:inline-block -- 显示为内联块元素,表现为同行显示并可修改宽高内外边距等属性
我们常将所有<li>元素加上display:inline-block样式,原本垂直的列表就可以水平显示了
vertical-align: bottom; 字体显示在一行
1、vertical-align
.content .star li{
vertical-align: bottom;
height: 135px;
/* vertical-align: bottom;底部对齐 */
}
vertical-align: bottom; 底部对齐
vertical-align: top; 顶部对齐
vertical-align: bottom; 水平对齐
2.超过文本设定的宽度显示省略号
.content .list .right .title{
margin-top: 30px;
display: block;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2; //浏览器的兼容
line-clamp: 2;
-webkit-box-orient: vertical;
}
3.背景图片(精灵图)
background-image: url(../img/icon/ico.png); //背景图片
background-repeat: no-repeat; //背景图片不平铺
background-position: 0px -72px; //背景图片的位置
面试题:
index 首页的更多相关文章
- index首页加载数据库数据方法
https://blog.csdn.net/qq_33198758/article/details/82987805 在做网站的时候,会遇到需要首页加载数据库数据的情况.而web.xml配置的首页: ...
- 003---设计首页index页面
在项目的urls.py文件添加一条url from django.contrib import admin from django.urls import path, re_path from app ...
- jeecms3.0.4版本 详解请求如何找到首页(转)
第一步:发送http://localhost:8080/emisstrade/ 请求 第二步:首先进入配置文件web.xml, <context-param> <param-name ...
- Module ngx_http_index_module nginx的首页模块
Example Configuration:例子配置文件Directives 指令 index 首页 The ngx_http_index_module module processes r ...
- 例子: 自制Flask首页导航.
# -*- coding:utf-8 -*- ''' Created on 2015年10月19日 ''' from flask import Flask, render_template impor ...
- 帝国cms面包屑导航的首页链接锚文本改成关键字
帝国cms面包屑导航的首页链接关键字一般都是“首页”二字或home,如果你想从这里提高锚文字的相关性,可以改成相应的关键字,那么如何来修改呢? 我们知道帝国CMS面包屑导航的变量是[!--newsna ...
- TP5 首页导航一级和二级分类
<ul id="jsddm"> <li><a class="navi_home" href="{:url('/index ...
- 帝国CMS当前位置中的“首页”二字如何修改
1.帝国CMS当前位置首页那两个字在哪里可以修改吗? 2.[!--newsnav--]该处的首页链接,请问在哪儿修改? 3.导航条[!--newsnav--]默认首页为:“首页”可以更改么? 4.导航 ...
- JEECMS站群管理系统-- 首页的加载过程
在浏览器中输入http://localhost:8080/jeecms,回车 首先进入配置文件web.xml, <context-param> <param-name>cont ...
随机推荐
- mogoose 创建数据库并增删改查
下载 npm i mongoose -s 连接数据库 const mongoose = require("mongoose"); mongoose.connect(dbURL); ...
- win10连接mysql提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
win10中cmd连接mysql提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YE ...
- linux,apache,php,mysql常用的查看版本信息的方法
1. 查看linux的内核版本,系统信息,常用的有三种办法: uname -a: more /etc/issue; cat /proc/version; 2. 查看apache的版本信息 ...
- Linux下实现高可用软件-Keepalived基础知识梳理
Keepalived介绍 Keepalived软件起初是专门为LVS负载均衡软件设计的,用来管理并监控LVS集群系统中各个服务节点的状态,后来又加入了可以实现高可用的VRRP功能.因此,Keepali ...
- 【SpringBoot技术专题】「权限校验专区」Shiro整合JWT授权和认证实现
本章介绍一下常用的认证框架Shiro结合springboot以及集合jwt快速带您开发完成一个认证框架机制. Maven配置依赖 <dependency> <groupId>o ...
- 演员 Or 开发者的自我修养
演员 Or 开发者的自我修养 时至今日,我都还是很怀念小时候与一群玩伴编写剧本.拍摄,那时候的我还有一个远大的"白日梦"--成为一名导演.很可惜,终究是"白日梦" ...
- Git学习笔记02-配置
安装好Git之后,做的就是需要配置Git了 第一步,配置自己的名称和邮箱 打开Git Bash 输入命令 git config --global user.name "用户名" g ...
- 题解 Weak in the Middle
题目传送门 Description 有一个长度为 \(n\) 的序列 \(a_{1,2,...,n}\) ,每次可以删掉 \(a_i\),当 \(\min(a_{i-1},a_{i+1})>a_ ...
- 小白自制Linux开发板 番外篇 一 modprobe加载驱动问题(转载整理)
使用modprobe加载驱动 转载地址:https://blog.csdn.net/qq_39101111/article/details/78773362 前面我们提到,modprobe并不需要指定 ...
- SPOJ16636 Journey IE2
SPOJ16636 Journey IE2 更好的阅读体验 在Byteland有n个城市,编号从1到n.这些城市由m条双向道路网络连接.众所周知,每一对城市最多只能由一条道路连接. Byteman最近 ...