kaola
2024-09-08 18:58:38
考拉布局
CSS
<style>
* {
margin: 0;
padding: 0;
}
body {
background-color: #f5f5f5;
}
.clearfix:after {
/*伪元素是行内元素 正常浏览器清除浮动方法*/
content: "";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix {
*zoom: 1;
/*ie6清除浮动的方式 *号只有IE6-IE7执行,其他浏览器不执行*/
}
.w {
width: 1100px;
margin: 0 auto;
background-color: #fff;
}
li {
list-style: none;
}
a {
text-decoration: none;
}
.w .sport {
height: 74px;
line-height: 74px;
}
.w .sport h2 {
float: left;
}
.w .sport .hotword li {
float: left;
margin-left: 14px;
}
.w .sport .hotword li:nth-child(1) {
color: gray;
}
.w .sport .hotword li a {
color: orange;
}
.w .sport .hotword .nike {
color: gray;
}
.w .sport .hotword li a:hover {
text-decoration: underline;
}
.w .more {
float: right;
color: gray;
}
.w .more:hover {
text-decoration: underline;
}
.w .content .rightshop {
float: right;
}
.w .content .rightshop .hotsell {
width: 207.4px;
height: 58px;
line-height: 58px;
padding-left: 10px;
border: 0.1px solid gray;
}
.w .content .rightshop li {
width: 216.4px;
height: 117.2px;
background-color: pink;
border: 1px solid gray;
}
.w .content .loaded {
float: left;
width: 330px;
height: 541px;
background-color: pink;
}
.w .content .shoe .items{
float: left;
width: 272.2px;
height: 268px;
background-color: pink;
/* border-left: 1px solid gray; */
border-top: 1px solid gray;
border-right: 1px solid gray;
}
</style>
HTML
<body>
<div class="w">
<div class="sport">
<h2 >运动户外</h2>
<ul class="hotword">
<li>热搜词:</li>
<li><a href="#">阿迪达斯</a></li>
<li><a href="#" class="nike">耐克</a></li>
<li><a href="#">斯凯奇</a></li>
<li><a href="#">安德玛</a></li>
</ul>
<li><a href="#" class="more">更多好货></a></li>
</div>
<div class="content">
<ul class="rightshop">
<h3 class="hotsell">最新热卖</h3>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
</ul>
<div class="loaded">
<!-- 左边大图片 -->
</div>
<ul class="shoe">
<li class="items items1"></li>
<li class="items items2"></li>
<li class="items items3"></li>
<li class="items items4"></li>
</ul>
</div>
</div>
</body>
难点在border对盒子大小的影响
最新文章
- Azure Backup (3) 使用Azure备份服务,备份Azure虚拟机
- Hadoop 学习资料集锦
- [noip科普]关于LIS和一类可以用树状数组优化的DP
- Java 基础 Map 练习题
- zookeeper 的多线程和单线程库使用对比
- fastcoloredtextbox 中文不重叠
- C# 中 KeyPress 、KeyDown 和KeyPress的详细区别[转]
- 爬虫技术 -- 进阶学习(八)模拟简单浏览器(附c#代码)
- nyoj 20
- ubuntu12.04 mysql服务器乱码问题的解决办法
- AdminLTE
- Unity 3D使用GameObject创建一个简单的可移动物体
- Centos7部署Zabbix
- Hibernate学习笔记四 查询
- 直接内存访问(DMA)
- 视频信号中xyz的提取
- JS学习记录------JS基本指令
- 215. 数组中的第K个最大元素
- XSS事件(一)
- D - I Think I Need a Houseboat(1.3.1)
热门文章
- corundum:100GNIC学习(三)——恢复工程
- Linux数据实时同步(sersync+rsync)
- 【4】java之基础数据类型的包装类
- 任务队列神器:Celery 入门到进阶指南
- HP DC7800 升级CPU出现:Missing or Invalid Processor Microcode Update &mdash;&mdash; 解决方案:更新主板BIOS
- VMware-安装rpm包出现警告:tigervnc-1.1.0-24.el6.x86_64.
- mysql8使用tmpfs内存磁盘当内存数据库的配置方法
- Vue npm run test 错误 (node:16672) UnhandledPromiseRejectionWarning: CssSyntaxError:xxxx.Unknown word
- java 自定义注解与示例
- 关于ie浏览器query ajax提交单个操作无效