为了账号安全,请及时绑定邮箱和手机立即绑定

这是跟老师一起做的,为何box1和老师所展现的box1不一样

<style type="text/css">

.box1{width=60%;height:40px;background:#00F;position:absolute;}

.box2{width:70%;height:30px;background:#C00;position:fixed;}

.content{width:80%;height:160px;background:green;}

.wrap{width:99%;padding:10px;height:400px;background:#999;}

.box{width:88%;height:200px;background:#FFCC00;}

</style>

</head>


<body>

<div class="wrap">

  <div class="box">

<div class="box1">box1</div>

<div class="box2">box2</div>

</div>

<div class="content">centent</div>

</div>

</body>


正在回答

1 回答

.box1{width=60%;height:40px;background:#00F;position:absolute;}


width:60%;

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
固定层效果
  • 参与学习       51922    人
  • 解答问题       148    个

运用属性值就轻松实现网页固定层效果

进入课程

这是跟老师一起做的,为何box1和老师所展现的box1不一样

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信