Php WordPress网站<;a href="&引用&燃气轮机</a>;不使用lightbox
我在WordPress网站上遇到了问题 以下是我的代码:Php WordPress网站<;a href="&引用&燃气轮机</a>;不使用lightbox,php,html,mysql,wordpress,Php,Html,Mysql,Wordpress,我在WordPress网站上遇到了问题 以下是我的代码: <a target="_blank" href="https://www.google.com"> <img width="288" height="590" alt="advertisement-1" src="http://www.modusliberty.com/wp-content/uploads/2015/06/Resurrection_Aromatique_Hand_Balm_75ml_0.jpg"
<a target="_blank" href="https://www.google.com">
<img width="288" height="590" alt="advertisement-1"
src="http://www.modusliberty.com/wp-content/uploads/2015/06/Resurrection_Aromatique_Hand_Balm_75ml_0.jpg"
class="aligncenter wp-image-746 size-full"></a>
当前,当我单击图像时,它会在lightbox中打开,但我希望当我单击图像时,url会在新窗口中打开。您是否使用css尝试过这样做:
<a class="lightbox" href="#goofy">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/158388/goofy.jpg"/>
</a>
<div class="lightbox-target" id="goofy">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/158388/goofy.jpg"/>
<a class="lightbox-close" href="#"></a>
</div>
请查看链接了解更多说明:或者我们可以使用css,如此处所示尝试从您的
中删除rel=“nobox”删除rel=“nobox”后不工作您需要为所有图像添加还是仅此图像?否。。。。。。。。。。。。。。。。。。。。。。。。。亲爱的,我不想用灯箱。。我的问题是,当我点击一个图像时,我的图标不起作用。因为当我点击图像时,图像在lightbox中打开,但我想做的是,当我点击图像时,浏览器就打开了……你们之前并没有特别提到这一点
*Eliminates padding, centers the thumbnail */
body, html {
padding: 0;
margin: 0;
text-align: center;
}
/* Styles the thumbnail */
a.lightbox img {
height: 150px;
border: 3px solid white;
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
margin: 94px 20px 20px 20px;
}
/* Styles the lightbox, removes it from sight and adds the fade-in transition */
.lightbox-target {
position: fixed;
top: -100%;
width: 100%;
background: rgba(0, 0, 0, 0.7);
width: 100%;
opacity: 0;
-webkit-transition: opacity .5s ease-in-out;
-moz-transition: opacity .5s ease-in-out;
-o-transition: opacity .5s ease-in-out;
transition: opacity .5s ease-in-out;
overflow: hidden;
}
/* Styles the lightbox image, centers it vertically and horizontally, adds the zoom-in transition and makes it responsive using a combination of margin and absolute positioning */
.lightbox-target img {
margin: auto;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
max-height: 0%;
max-width: 0%;
border: 3px solid white;
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
box-sizing: border-box;
-webkit-transition: .5s ease-in-out;
-moz-transition: .5s ease-in-out;
-o-transition: .5s ease-in-out;
transition: .5s ease-in-out;
}
/* Styles the close link, adds the slide down transition */
a.lightbox-close {
display: block;
width: 50px;
height: 50px;
box-sizing: border-box;
background: white;
color: black;
text-decoration: none;
position: absolute;
top: -80px;
right: 0;
-webkit-transition: .5s ease-in-out;
-moz-transition: .5s ease-in-out;
-o-transition: .5s ease-in-out;
transition: .5s ease-in-out;
}
/* Provides part of the "X" to eliminate an image from the close link */
a.lightbox-close:before {
content: "";
display: block;
height: 30px;
width: 1px;
background: black;
position: absolute;
left: 26px;
top: 10px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
}
/* Provides part of the "X" to eliminate an image from the close link */
a.lightbox-close:after {
content: "";
display: block;
height: 30px;
width: 1px;
background: black;
position: absolute;
left: 26px;
top: 10px;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
}
/* Uses the :target pseudo-class to perform the animations upon clicking the .lightbox-target anchor */
.lightbox-target:target {
opacity: 1;
top: 0;
bottom: 0;
}
.lightbox-target:target img {
max-height: 100%;
max-width: 100%;
}
.lightbox-target:target a.lightbox-close {
top: 0px;
}