我有一个我正在使用的HTML模板,我正在尝试将目标留空到Anchor标记,但链接不会在新选项卡和当前选项卡中打开。另请参阅此link以获取参考资料。
以下是该页面的HTML部分:
<div class="grid"> <div class="item col-md-3 col-sm-4 col-xs-6"> <a href="#" class="hover-overlay" target="_blank"> <img alt="Project 1" src="images/placeholders/adp8.jpg"> <div class="overlay background-90-a"> <div class="hidden-xs"> <p class="title heading-a"> <span class="highlight">Luds</span> </p> <p class="text-center heading-a"> <strong>Alter Disco Podcast 8</strong> </p> <p class="text-center"> <i class="fa fa-soundcloud heading-a"></i> </p> </div> </div> </a> </div> <div class="item col-md-3 col-sm-4 col-xs-6"> <a href="https://soundcloud.com/alterdisco/peter-clamat-alter-disco-podcast-7-superhazi-tape" class="hover-overlay"> <img alt="Project 1" src="images/placeholders/500x400-0.jpg"> <div class="overlay background-90-a"> <div class="hidden-xs"> <p class="title heading-a"><span class="highlight">Peter Clamat</span></p> <p class="text-center heading-a"><strong>Süperhazi Tape</strong></p> <p class="text-center heading-a"><strong>Alter Disco Podcast 7</strong></p> <p class="text-center"><i class="fa fa-soundcloud heading-a"></i></p> </div> </div> </a> </div> <div class="item col-md-3 col-sm-4 col-xs-6"> <a href="https://soundcloud.com/alterdisco/claudio-rotunno-alter-disco-podcast-6" class="hover-overlay" target="_blank"> <img alt="Project 2" src="images/placeholders/500x400-1.jpg" /> <div class="overlay background-90-a"> <div class="hidden-xs"> <p class="title heading-a"><span class="highlight">Cláudio Rotunno</span></p> <p class="text-center heading-a"><strong>Alter Disco Podcast 6</strong></p> <p class="text-center"><i class="fa fa-soundcloud heading-a"></i></p> </div> </div> </a> </div> <div class="item col-md-3 col-sm-4 col-xs-6"> <a href="https://soundcloud.com/alterdisco/barbara-boeing-alter-disco-podcast-5-frenetic-movements-for-unusual-people" class="hover-overlay" target="_blank"> <img alt="Project 3" src="images/placeholders/500x400-2.jpg" /> <div class="overlay background-90-a"> <div class="hidden-xs"> <p class="title heading-a"><span class="highlight">Barbara Boeing</span></p> <p class="text-center heading-a"><strong>Frenetic movements for unusual people</strong></p> <p class="text-center heading-a"><strong>Alter Disco Podcast 5</strong></p> <p class="text-center"><i class="fa fa-soundcloud heading-a"></i></p> </div> </div> </a> </div> <div class="item col-md-3 col-sm-4 col-xs-6"> <a href="#!portfolio-item-4.html" class="hover-overlay"> <img alt="Project 4" src="images/placeholders/500x400-alt004.jpg" /> <div class="overlay background-90-a"> <div class="hidden-xs"> <p class="title heading-a"><span class="highlight">Phil Mill</span></p> <p class="text-center heading-a"><strong>Alter Disco Podcast 4</strong></p> <p class="text-center"><i class="fa fa-soundcloud heading-a"></i></p> </div> </div> </a> </div> <div class="item col-md-3 col-sm-4 col-xs-6"> <a href="#!portfolio-item-5.html" class="hover-overlay"> <img alt="Project 5" src="images/placeholders/500x400-alt003.jpg" /> <div class="overlay background-90-a"> <div class="hidden-xs"> <p class="title heading-a"><span class="highlight">De Sena</span></p> <p class="text-center heading-a"><strong>Alter Disco Podcast 3</strong></p> <p class="text-center"><i class="fa fa-soundcloud heading-a"></i></p> </div> </div> </a> </div> <div class="item col-md-3 col-sm-4 col-xs-6"> <a href="#!portfolio-item-6.html" class="hover-overlay"> <img alt="Project 6" src="images/placeholders/500x400-alt002.jpg" /> <div class="overlay background-90-a"> <div class="hidden-xs"> <p class="title heading-a"><span class="highlight">Phil Mill</span></p> <p class="text-center heading-a"><strong>Alter Disco Podcast 2</strong></p> <p class="text-center"><i class="fa fa-soundcloud heading-a"></i></p> </div> </div> </a> </div> <div class="item col-md-3 col-sm-4 col-xs-6"> <a href="#!portfolio-item-7.html" class="hover-overlay"> <img alt="Project 7" src="images/placeholders/500x400-alt001.jpg" /> <div class="overlay background-90-a"> <div class="hidden-xs"> <p class="title heading-a"><span class="highlight">De Sena</span></p> <p class="text-center heading-a"><strong>Alter Disco Podcast 1</strong></p> <p class="text-center"><i class="fa fa-soundcloud heading-a"></i></p> </div> </div> </a> </div> </div>
答案 0 :(得分:0)
将href="https://www.google.fr/?gws_rd=ssl"
链接替换为每个相应的项目链接
<div class="grid"> <div class="item col-md-3 col-sm-4 col-xs-6"> <a href="https://www.google.fr/?gws_rd=ssl" class="hover-overlay" target="_blank"> <img alt="Project 1" src="images/placeholders/adp8.jpg"> <div class="overlay background-90-a"> <div class="hidden-xs"> <p class="title heading-a"> <span class="highlight">Luds</span> </p> <p class="text-center heading-a"> <strong>Alter Disco Podcast 8</strong> </p> <p class="text-center"> <i class="fa fa-soundcloud heading-a"></i> </p> </div> </div> </a> </div> <div class="item col-md-3 col-sm-4 col-xs-6"> <a href="https://soundcloud.com/alterdisco/peter-clamat-alter-disco-podcast-7-superhazi-tape" class="hover-overlay" target="_blank"> <img alt="Project 1" src="images/placeholders/500x400-0.jpg"> <div class="overlay background-90-a"> <div class="hidden-xs"> <p class="title heading-a"><span class="highlight">Peter Clamat</span></p> <p class="text-center heading-a"><strong>Süperhazi Tape</strong></p> <p class="text-center heading-a"><strong>Alter Disco Podcast 7</strong></p> <p class="text-center"><i class="fa fa-soundcloud heading-a"></i></p> </div> </div> </a> </div> <div class="item col-md-3 col-sm-4 col-xs-6"> <a href="https://soundcloud.com/alterdisco/claudio-rotunno-alter-disco-podcast-6" class="hover-overlay" target="_blank"> <img alt="Project 2" src="images/placeholders/500x400-1.jpg" /> <div class="overlay background-90-a"> <div class="hidden-xs"> <p class="title heading-a"><span class="highlight">Cláudio Rotunno</span></p> <p class="text-center heading-a"><strong>Alter Disco Podcast 6</strong></p> <p class="text-center"><i class="fa fa-soundcloud heading-a"></i></p> </div> </div> </a> </div> <div class="item col-md-3 col-sm-4 col-xs-6"> <a href="https://soundcloud.com/alterdisco/barbara-boeing-alter-disco-podcast-5-frenetic-movements-for-unusual-people" class="hover-overlay" target="_blank"> <img alt="Project 3" src="images/placeholders/500x400-2.jpg" /> <div class="overlay background-90-a"> <div class="hidden-xs"> <p class="title heading-a"><span class="highlight">Barbara Boeing</span></p> <p class="text-center heading-a"><strong>Frenetic movements for unusual people</strong></p> <p class="text-center heading-a"><strong>Alter Disco Podcast 5</strong></p> <p class="text-center"><i class="fa fa-soundcloud heading-a"></i></p> </div> </div> </a> </div> <div class="item col-md-3 col-sm-4 col-xs-6"> <a href="https://www.google.fr/?gws_rd=ssl" class="hover-overlay" target="_blank"> <img alt="Project 4" src="images/placeholders/500x400-alt004.jpg" /> <div class="overlay background-90-a"> <div class="hidden-xs"> <p class="title heading-a"><span class="highlight">Phil Mill</span></p> <p class="text-center heading-a"><strong>Alter Disco Podcast 4</strong></p> <p class="text-center"><i class="fa fa-soundcloud heading-a"></i></p> </div> </div> </a> </div> <div class="item col-md-3 col-sm-4 col-xs-6"> <a href="https://www.google.fr/?gws_rd=ssl" class="hover-overlay" target="_blank"> <img alt="Project 5" src="images/placeholders/500x400-alt003.jpg" /> <div class="overlay background-90-a"> <div class="hidden-xs"> <p class="title heading-a"><span class="highlight">De Sena</span></p> <p class="text-center heading-a"><strong>Alter Disco Podcast 3</strong></p> <p class="text-center"><i class="fa fa-soundcloud heading-a"></i></p> </div> </div> </a> </div> <div class="item col-md-3 col-sm-4 col-xs-6"> <a href="https://www.google.fr/?gws_rd=ssl" class="hover-overlay" target="_blank"> <img alt="Project 6" src="images/placeholders/500x400-alt002.jpg" /> <div class="overlay background-90-a"> <div class="hidden-xs"> <p class="title heading-a"><span class="highlight">Phil Mill</span></p> <p class="text-center heading-a"><strong>Alter Disco Podcast 2</strong></p> <p class="text-center"><i class="fa fa-soundcloud heading-a"></i></p> </div> </div> </a> </div> <div class="item col-md-3 col-sm-4 col-xs-6"> <a href="https://www.google.fr/?gws_rd=ssl" class="hover-overlay" target="_blank"> <img alt="Project 7" src="images/placeholders/500x400-alt001.jpg" /> <div class="overlay background-90-a"> <div class="hidden-xs"> <p class="title heading-a"><span class="highlight">De Sena</span></p> <p class="text-center heading-a"><strong>Alter Disco Podcast 1</strong></p> <p class="text-center"><i class="fa fa-soundcloud heading-a"></i></p> </div> </div> </a> </div> </div>