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

什么原因呢?

代码和老师一样啊  无法显示效果    https://img1.sycdn.imooc.com//5c3c30ab00015e7209450956.jpg

正在回答

3 回答


【蜘蛛侠TG@abin789】-12201
【蜘蛛侠TG@abin789】-12202
【蜘蛛侠TG@abin789】-12203
【蜘蛛侠TG@abin789】-12204
【蜘蛛侠TG@abin789】-12205
【蜘蛛侠TG@abin789】-12206
【蜘蛛侠TG@abin789】-12207
【蜘蛛侠TG@abin789】-12208
【蜘蛛侠TG@abin789】-12209
【蜘蛛侠TG@abin789】-12210
【蜘蛛侠TG@abin789】-12211
【蜘蛛侠TG@abin789】-12212
【蜘蛛侠TG@abin789】-12213
【蜘蛛侠TG@abin789】-12214
【蜘蛛侠TG@abin789】-12215
【蜘蛛侠TG@abin789】-12216
【蜘蛛侠TG@abin789】-12217
【蜘蛛侠TG@abin789】-12218
【蜘蛛侠TG@abin789】-12219
【蜘蛛侠TG@abin789】-12220
【蜘蛛侠TG@abin789】-12221
【蜘蛛侠TG@abin789】-12222
【蜘蛛侠TG@abin789】-12223
【蜘蛛侠TG@abin789】-12224
【蜘蛛侠TG@abin789】-12225
【蜘蛛侠TG@abin789】-12226
【蜘蛛侠TG@abin789】-12227
【蜘蛛侠TG@abin789】-12228
【蜘蛛侠TG@abin789】-12229
【蜘蛛侠TG@abin789】-12230
【蜘蛛侠TG@abin789】-12231
【蜘蛛侠TG@abin789】-12232
【蜘蛛侠TG@abin789】-12233
【蜘蛛侠TG@abin789】-12234
【蜘蛛侠TG@abin789】-12235
【蜘蛛侠TG@abin789】-12236
【蜘蛛侠TG@abin789】-12237
【蜘蛛侠TG@abin789】-12238
【蜘蛛侠TG@abin789】-12239
【蜘蛛侠TG@abin789】-12240
【蜘蛛侠TG@abin789】-12241
【蜘蛛侠TG@abin789】-12242
【蜘蛛侠TG@abin789】-12243
【蜘蛛侠TG@abin789】-12244
【蜘蛛侠TG@abin789】-12245
【蜘蛛侠TG@abin789】-12246
【蜘蛛侠TG@abin789】-12247
【蜘蛛侠TG@abin789】-12248
【蜘蛛侠TG@abin789】-12249
【蜘蛛侠TG@abin789】-12250
【蜘蛛侠TG@abin789】-12251
【蜘蛛侠TG@abin789】-12252
【蜘蛛侠TG@abin789】-12253
【蜘蛛侠TG@abin789】-12254
【蜘蛛侠TG@abin789】-12255
【蜘蛛侠TG@abin789】-12256
【蜘蛛侠TG@abin789】-12257
【蜘蛛侠TG@abin789】-12258
【蜘蛛侠TG@abin789】-12259
【蜘蛛侠TG@abin789】-12260
【蜘蛛侠TG@abin789】-12261
【蜘蛛侠TG@abin789】-12262
【蜘蛛侠TG@abin789】-12263
【蜘蛛侠TG@abin789】-12264
【蜘蛛侠TG@abin789】-12265
【蜘蛛侠TG@abin789】-12266
【蜘蛛侠TG@abin789】-12267
【蜘蛛侠TG@abin789】-12268
【蜘蛛侠TG@abin789】-12269
【蜘蛛侠TG@abin789】-12270
【蜘蛛侠TG@abin789】-12271
【蜘蛛侠TG@abin789】-12272
【蜘蛛侠TG@abin789】-12273
【蜘蛛侠TG@abin789】-12274
【蜘蛛侠TG@abin789】-12275
【蜘蛛侠TG@abin789】-12276
【蜘蛛侠TG@abin789】-12277
【蜘蛛侠TG@abin789】-12278
【蜘蛛侠TG@abin789】-12279
【蜘蛛侠TG@abin789】-12280
【蜘蛛侠TG@abin789】-12281
【蜘蛛侠TG@abin789】-12282
【蜘蛛侠TG@abin789】-12283
【蜘蛛侠TG@abin789】-12284
【蜘蛛侠TG@abin789】-12285
【蜘蛛侠TG@abin789】-12286
【蜘蛛侠TG@abin789】-12287
【蜘蛛侠TG@abin789】-12288
【蜘蛛侠TG@abin789】-12289
【蜘蛛侠TG@abin789】-12290
【蜘蛛侠TG@abin789】-12291
【蜘蛛侠TG@abin789】-12292
【蜘蛛侠TG@abin789】-12293
【蜘蛛侠TG@abin789】-12294
【蜘蛛侠TG@abin789】-12295
【蜘蛛侠TG@abin789】-12296
【蜘蛛侠TG@abin789】-12297
【蜘蛛侠TG@abin789】-12298
【蜘蛛侠TG@abin789】-12299
【蜘蛛侠TG@abin789】-12300
【蜘蛛侠TG@abin789】-12301
【蜘蛛侠TG@abin789】-12302
【蜘蛛侠TG@abin789】-12303
【蜘蛛侠TG@abin789】-12304
【蜘蛛侠TG@abin789】-12305
【蜘蛛侠TG@abin789】-12306
【蜘蛛侠TG@abin789】-12307
【蜘蛛侠TG@abin789】-12308
【蜘蛛侠TG@abin789】-12309
【蜘蛛侠TG@abin789】-12310
【蜘蛛侠TG@abin789】-12311
【蜘蛛侠TG@abin789】-12312
【蜘蛛侠TG@abin789】-12313
【蜘蛛侠TG@abin789】-12314
【蜘蛛侠TG@abin789】-12315
【蜘蛛侠TG@abin789】-12316
【蜘蛛侠TG@abin789】-12317
【蜘蛛侠TG@abin789】-12318
【蜘蛛侠TG@abin789】-12319
【蜘蛛侠TG@abin789】-12320
【蜘蛛侠TG@abin789】-12321
【蜘蛛侠TG@abin789】-12322
【蜘蛛侠TG@abin789】-12323
【蜘蛛侠TG@abin789】-12324
【蜘蛛侠TG@abin789】-12325
【蜘蛛侠TG@abin789】-12326
【蜘蛛侠TG@abin789】-12327
【蜘蛛侠TG@abin789】-12328
【蜘蛛侠TG@abin789】-12329
【蜘蛛侠TG@abin789】-12330
【蜘蛛侠TG@abin789】-12331
【蜘蛛侠TG@abin789】-12332
【蜘蛛侠TG@abin789】-12333
【蜘蛛侠TG@abin789】-12334
【蜘蛛侠TG@abin789】-12335
【蜘蛛侠TG@abin789】-12336
【蜘蛛侠TG@abin789】-12337
【蜘蛛侠TG@abin789】-12338
【蜘蛛侠TG@abin789】-12339
【蜘蛛侠TG@abin789】-12340
【蜘蛛侠TG@abin789】-12341
【蜘蛛侠TG@abin789】-12342
【蜘蛛侠TG@abin789】-12343
【蜘蛛侠TG@abin789】-12344
【蜘蛛侠TG@abin789】-12345
【蜘蛛侠TG@abin789】-12346
【蜘蛛侠TG@abin789】-12347
【蜘蛛侠TG@abin789】-12348
【蜘蛛侠TG@abin789】-12349
【蜘蛛侠TG@abin789】-12350
【蜘蛛侠TG@abin789】-12351
【蜘蛛侠TG@abin789】-12352
【蜘蛛侠TG@abin789】-12353
【蜘蛛侠TG@abin789】-12354
【蜘蛛侠TG@abin789】-12355
【蜘蛛侠TG@abin789】-12356
【蜘蛛侠TG@abin789】-12357
【蜘蛛侠TG@abin789】-12358
【蜘蛛侠TG@abin789】-12359
【蜘蛛侠TG@abin789】-12360
【蜘蛛侠TG@abin789】-12361
【蜘蛛侠TG@abin789】-12362
【蜘蛛侠TG@abin789】-12363
【蜘蛛侠TG@abin789】-12364
【蜘蛛侠TG@abin789】-12365
【蜘蛛侠TG@abin789】-12366
【蜘蛛侠TG@abin789】-12367
【蜘蛛侠TG@abin789】-12368
【蜘蛛侠TG@abin789】-12369
【蜘蛛侠TG@abin789】-12370
【蜘蛛侠TG@abin789】-12371
【蜘蛛侠TG@abin789】-12372
【蜘蛛侠TG@abin789】-12373
【蜘蛛侠TG@abin789】-12374
【蜘蛛侠TG@abin789】-12375
【蜘蛛侠TG@abin789】-12376
【蜘蛛侠TG@abin789】-12377
【蜘蛛侠TG@abin789】-12378
【蜘蛛侠TG@abin789】-12379
【蜘蛛侠TG@abin789】-12380
【蜘蛛侠TG@abin789】-12381
【蜘蛛侠TG@abin789】-12382
【蜘蛛侠TG@abin789】-12383
【蜘蛛侠TG@abin789】-12384
【蜘蛛侠TG@abin789】-12385
【蜘蛛侠TG@abin789】-12386
【蜘蛛侠TG@abin789】-12387
【蜘蛛侠TG@abin789】-12388
【蜘蛛侠TG@abin789】-12389
【蜘蛛侠TG@abin789】-12390
【蜘蛛侠TG@abin789】-12391
【蜘蛛侠TG@abin789】-12392
【蜘蛛侠TG@abin789】-12393
【蜘蛛侠TG@abin789】-12394
【蜘蛛侠TG@abin789】-12395
【蜘蛛侠TG@abin789】-12396
【蜘蛛侠TG@abin789】-12397
【蜘蛛侠TG@abin789】-12398
【蜘蛛侠TG@abin789】-12399
【蜘蛛侠TG@abin789】-12400

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

代码发给我瞅瞅。332743644

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

<html>

<head>

  <meta charset="UTF-8">

  <title>Document</title>

  <style>

  #box{

  position: relative;

  overflow: hidden;

  height: 400px;

  }

  #box div{

  position: absolute;

  width: 400px;

  height: 400px;

  border: 1px solid #000;

  overflow: hidden;

  }

  .one{background: #ff8f78;}

  .two{background: #f86338;}

  .three{background: #ff84f8;}

  .four{background: #f33f28;}

  </style>

</head>

<body>

<div id="box">

<div class="one">1</div>

<div class="two">2</div>

<div class="three">3</div>

<div class="four">4</div>

</div>

<script>

window.onload = function(){

var oBox = document.getElementById("box");

var cBox = oBox.getElementsByTagName("div");

//console.log(cBox[0].offsetWidth)

var boxLen = cBox[0].offsetWidth;

var between = 200;

oBox.style.width = boxLen+(cBox.length-1)*between+"px";

function reset(){

for(var i =1;i<cBox.length;i++){

cBox[i].style.left = boxLen + (i-1)*between + "px";

}

}

reset();

var trans = boxLen - between

for(var i =0;i<cBox.length;i++){

(function(i){

cBox[i].onmouseover = function(){

reset();

for(var j = 1;j<=i;j++){

cBox[j].style.left = parseInt(cBox[j].style.left)-trans + "px";

}

}

})(i)

}

}

</script>

</body>

</html>


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

举报

0/150
提交
取消

什么原因呢?

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