京东商城导航条

Original 2019-01-20 13:54:10 250
abstract:<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">&

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta http-equiv="X-UA-Compatible" content="ie=edge">

<title>京东(JD.com)-正品低价,品质保障,配送及时,轻松购物!</title>

<link rel="stylesheet" href="E:\front\京东商城demo.css">

<link rel="stylesheet" href="E:\front\CSS\font-awesome-4.7.0\css\font-awesome.min.css">

</head>

<body>

<div class="header">

<div class="img"><img src="E:\front\京东狗.jpg"></div>

<div class="header_content">

<div class="header_left">

<a href="" class="header_a" ><i class="fa fa-map-marker" aria-hidden="true"></i>&nbsp;&nbsp;广州</a>

</div>

<div class="header_right">

<a href="" class="header_a" >你好,请登陆</a>

<a href="" class="header_a">免费注册</a>

<a href="" class="header_a">我的订单</a>

<a href="" class="header_a">我的京东</a>

<a href="" class="header_a">京东会员</a>

<a href="" class="header_a">企业采购</a>

<a href="" class="header_a">客户服务</a>

<a href="" class="header_a">网站导航</a>

<a href="" class="header_a">手机京东</a>

</div>

</div>

<div class="clear"></div>

</div>

<div class="year"><img src="E:\front\年货节.jpg"></div>

</body>

</html>


----------------------------------------------------------------------------------------------------------------------------------------

京东商城导航css:

*{margin: 0px; padding: 0px;}

a{text-decoration: none;color: #999999;font-size: 12px;}

.clear{clear:both}

body{

background-color: #F0F3EF;

height: 2000px;

}

.header{width: 100%;background-color: #E3E4E5;height: 30px;}

.header .header_content{width: 1200px;margin: 0px auto;height: 30px;}

.header .header_content .header_left{

height: 30px;

float: left;

}

.header .header_content .header_right{

width: 900px;

height: 30px;

float: right;

}

.header_content a:hover{color: lightcoral}

.header_a{display: inline-block;height: 30px;width: 80px;text-align: center;}

.img{

float: right;

position: relative;

right: 1530px;

}


.year{

float: right;

position: fixed;

right: 0px;

top: 0px;

}

疑问:为啥有一张图片"img"只有向右浮动才看的到,但是向左浮动就会消失不见......

Correcting teacher:韦小宝Correction time:2019-01-20 15:33:32
Teacher's summary:你可以F12看一下,应该是被其他的东西覆盖了,挡住了

Release Notes

Popular Entries