学习HTML5+CSS3 (8.2)将图片转成HTML

图片:


练习


HTML:

<div class="demo">

<div class="top1">

<img src="img/parter2-1.png" / class="img1">

<img src="img/parter2-2.png" />

</div>

<div class="top2">

<img src="img/parter2-3.png" class="img2" />

<img src="img/parter2-4.png" />

</div>

<ul class="left">

<li><span class="dots"></span>游戏体验棒呆 发烧首选</li>

<li><span class="dots"></span>作为一个玩家,我选它!</li>

<li><span class="dots"></span>热升华机械键盘不二之选</li>

<li><span class="dots"></span>小鲜肉的专属清新味道</li>

</ul>

<ul class="right">

<li><span class="dots"></span>黑科技跑鞋你穿过没?</li>

<li><span class="dots"></span>值!小狗吸尘器仅售99</li>

<li><span class="dots"></span>瞬间提高逼格的方式之一</li>

<li><span class="dots"></span>送女票礼物买它就对了</li>

</ul>

</div>



CSS:

* {

padding: 0;

margin: 0;

}

.demo {

width: 367px;

height: 425px;

/*background: salmon;*/

margin: 200px auto;

border: 1px dashed blue;

}

.top1 {

width: 367px;

height: 144px;

background: white;

}

.img1 {

margin: 14px 10px 0 6px;

}

.top2 {

width: 367px;

height: 140px;

background: white;

}

.img2 {

margin: 10px 10px 0 6px;

}

.dots {

float: left;

width: 3px;

height: 3px;

background: #dbdbdb;

margin: 5px 7px 0 0;

display: block;

}

.left {

float: left;

list-style: none;

margin-right: 10px;

margin-top: 19px;

}

.left>li {

list-style: none;

width: 170px;

height: 14px;

font-size: 14px;

line-height: 14px;

color: #333333;

margin-bottom: 16px;

}

.right {

float: left;

list-style: none;

margin-top: 19px;

}

.right>li {

list-style: none;

width: 170px;

height: 14px;

font-size: 14px;

line-height: 14px;

color: #333333;

margin-bottom: 16px;

}


运行结果:


©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 1. tab列表折叠效果 html: 能源系统事业部 岗位名称: 工作地点 岗位名...
    lilyping阅读 1,899评论 0 1
  • 1、垂直对齐 如果你用CSS,则你会有困惑:我该怎么垂直对齐容器中的元素?现在,利用CSS3的Transform,...
    kiddings阅读 3,203评论 0 11
  • 不会用代码框,所以看着有些乱套,,,,html部分 <!DOCTYPE html> 迅雷看看 ...
    这就是个帅气的名字阅读 1,563评论 0 0
  • 问答题47 /72 常见浏览器兼容性问题与解决方案? 参考答案 (1)浏览器兼容问题一:不同浏览器的标签默认的外补...
    _Yfling阅读 13,806评论 1 92
  • 字典是Python的映射结构,是一种可变类型容器,且可存储任意类型对象。 一.字典的形式: 字典的每个键值(key...
    躺在稻田里的小白菜阅读 472评论 0 1