關(guān)于<a href="#bg1">
下面這段代碼是不是讓圖片在文字上面或者在在一起?我自己試了下并沒有關(guān)聯(lián)
<body>
? ? ? ?<div class="slider">
? ? ? ? ? ?<ul class="clearfix">
? ? ? ? ? ?????<li><a href="#bg1">Hipster Fashion Haircut </a></li>
? ? ? ?????????<li><a href="#bg2">Cloud Computing Services & Consulting</a></li>
? ? ? ?????????<li><a href="#bg3">My haire is sooo fantastic!</a></li>
? ? ? ?????????<li><a href="#bg4">Eat healthy & excersice!</a></li>
? ? ? ?????????<li><a href="#bg5">Lips so kissable I could die ...</a></li>
? ? ? ?????</ul>
? ? ? ?</div>
? ? ? ?<img src="https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=2927464136,30546800&fm=15&gp=0.jpg" alt="" class="bg slideLeft" id="bg1" />
? ? ? ?<img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=135197569,3162678290&fm=15&gp=0.jpg" alt="" class="bg slideBottom" id="bg2" />
? ? ? ?<img src="https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2761419731,1583069470&fm=27&gp=0.jpg" alt="" class="bg zoomIn" id="bg3" />
? ? ? ?<img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1800437085,3697988398&fm=27&gp=0.jpg" alt="" class="bg zoomOut" id="bg4" />
? ? ? ?<img src="https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2547491788,3355958735&fm=27&gp=0.jpg" alt="" class="bg rotate" id="bg5" />
? ?</body>
</html>
2019-08-08
這里跟綁定差不多,用來(lái)點(diǎn)擊a里面縮略圖,觸發(fā)target 屬性,然后更改css里的背景圖片
2019-02-28
<a href="#bg1">里的#bg1時(shí)HTML里的錨點(diǎn),#后面跟的是要跳轉(zhuǎn)的id值,點(diǎn)擊a鏈接后窗口會(huì)自動(dòng)滾動(dòng)到對(duì)應(yīng)id的元素,你試著把圖片block一下占滿屏幕,讓窗口的滾動(dòng)條出來(lái)