关于百度产品更多侧边栏的实现

最终效果图如下:

图片发自简书App


源代码如下:

<!DOCTYPE html>

<html >

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>百度产品更多侧边栏的实现</title>

<style>

/*内部样式表*/

#box{width:134px;

height:1015px;

background:#f9f9f9;}

/*总体盒子样式包括像素以及背景颜色*/

#title{width:134px;

height:79px;

background:url(%E6%9B%B4%E5%A4%9A%E4%BA%A7%E5%93%81.gif) 16px 21px no-repeat  ;

border-bottom: 2px solid #f0f0f0;}

#div-02{width:134px;

height:152px;

background:url(2.gif) 27px 42px  no-repeat  ;

border-bottom:solid #f0f0f0 2px}

#div-03{width:134px;

height:152px;

background:url(001.gif) 36px 27px no-repeat  ;

border-bottom:solid #f0f0f0 2px}

#div-04{width:134px;

height:152px;

background:url(3.gif) 31px 20px no-repeat  ;

border-bottom:solid #f0f0f0 2px}

#div-05{width:134px;

height:152px;

background:url(4.gif) 36px 20px no-repeat  ;

border-bottom:solid #f0f0f0 2px}

#div-06{width:134px;

height:152px;

background:url(5.gif) 31px 25px no-repeat  ;

border-bottom:solid #f0f0f0 2px}

#div-07{width:134px;

height:152px;

background:url(6.gif) 34px 23px no-repeat  ;

border-bottom:solid #f0f0f0 2px}

/*各个分块样式包括:背景图片链接、图片位置、是否重复、以及边框样式*/

</style>

</head>


<body>

<div id="box">

<!--盒子div-->

<div id="title"></div>

<div id="div-02"></div>

<div id="div-03"></div>

<div id="div-04"></div>

<div id="div-05"></div>

<div id="div-06"></div>

<div id="div-07"></div>

<!--各个分块div-->

</div>

</body>

</html>

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

推荐阅读更多精彩内容

  • 1、垂直对齐 如果你用CSS,则你会有困惑:我该怎么垂直对齐容器中的元素?现在,利用CSS3的Transform,...
    kiddings阅读 3,208评论 0 11
  • 卡尔维诺中文站留言板这个帖子专门用作卡尔维诺中文站的留言板,欢迎大家留言和提问。...阮一峰2007-01-04T...
    舟渔行舟阅读 333评论 0 1
  • 1. tab列表折叠效果 html: 能源系统事业部 岗位名称: 工作地点 岗位名...
    lilyping阅读 1,909评论 0 1
  • 11月1日,世界杯历史最佳射手、德国队史最佳射手、传奇前锋克洛泽宣布正式退役,他将以见习教练身份重返德国国家队辅佐...
    黄轩励阅读 1,109评论 3 11
  • 刚刚想起我爸妈已经61岁了,而我还没有大学毕业。就突然很想哭~不知道他们还能陪我几个十年,祝我爸妈身体健康,长命百...
    宋初心阅读 237评论 0 0