html中a标签里img,一个div里面含有a标签,a标签里有img标签,为什么div与a之间有空隙,不能完全贴合???...

*{

padding: 0;

margin: 0 auto;

font-family: "宋体";

}

.Slider,.Content,.Main{

width: 100%;

height: 400px;

}

/*幻灯片内容*/

.Content /*.Main*/{

position: relative;

}

/*幻灯片图片*/

.Content .Main img{

width: 100%;

height: 400px;

}

/*幻灯片主题*/

.Content .Main .Caption{

position: absolute;

top:22%;

left: 25%;

}

.Content .Main .Caption h2{

font-size: 40px;

line-height: 50px;

text-align: right;

margin-right: -45px;

color: gray;

}

.Content .Main .Caption h3{

font-size: 75px;

line-height: 75px;

text-align: left;

margin-left: -45px;

color: rgb(000,000,000);

}

/*幻灯片控制按钮*/

.Content .Control{

width: 100%;

height: 13px;

position: absolute;

left: 0;

bottom:-13px;

background: red;

text-align: center;

}

.Content .Control a{

display: inline-block;

background: gray;

width: 180px;

height: 13px;

position: relative;

}

.Content .Control img{

width: 180px;

position: absolute;

bottom: 13px;

left: 0;

}

.main-active .Caption h2{

margin-right: 0;

transition: all,0.5s;

}

.main-active .Caption h3{

margin-left: 0;

transition: all,0.8s;

}

html:

带预览效果的幻灯片

%7B%7Bindex%7D%7D.jpg

{{h2}}

{{h3}}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值