|
|
|
@ -64,62 +64,18 @@
|
|
|
|
|
if(!$isImg && $enquiry) { ?>
|
|
|
|
|
<a class="btn btn-primary btn-lg btn-enquiry" <?php echo WPCOM::url($enquiry_url);?>><?php echo $enquiry;?>
|
|
|
|
|
<?php } elseif ($isImg && $enquiry) { ?>
|
|
|
|
|
<a class="btn btn-primary btn-lg btn-enquiry" href="javascript:;">
|
|
|
|
|
<a class="btn btn-primary btn-lg btn-enquiry btn-enquiry-img" href="javascript:;" data-url="<?php echo $enquiry_url;?>">
|
|
|
|
|
<?php echo $enquiry;?>
|
|
|
|
|
<div class="sweep_code">
|
|
|
|
|
<!-- <div class="code_arrow"></div> -->
|
|
|
|
|
<div class="code">
|
|
|
|
|
<img src="<?php echo $enquiry_url; ?>" alt="">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</a>
|
|
|
|
|
<?php } ?>
|
|
|
|
|
</div>
|
|
|
|
|
<style>
|
|
|
|
|
.btn-enquiry .sweep_code {
|
|
|
|
|
opacity: 0;
|
|
|
|
|
visibility: hidden;
|
|
|
|
|
margin-left: -80px;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 105px;
|
|
|
|
|
left: 50%;
|
|
|
|
|
z-index: 97;
|
|
|
|
|
transition: all 0.6s cubic-bezier(0.18, 0.89, 0.32, 1.28)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-enquiry:hover .sweep_code {
|
|
|
|
|
opacity: 1;
|
|
|
|
|
visibility: visible;
|
|
|
|
|
top: 40px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-enquiry .sweep_code .code_arrow {
|
|
|
|
|
border-bottom: 15px solid #FFF;
|
|
|
|
|
border-left: 15px solid transparent;
|
|
|
|
|
border-right: 15px solid transparent;
|
|
|
|
|
font-size: 0;
|
|
|
|
|
height: 0;
|
|
|
|
|
width: 0;
|
|
|
|
|
line-height: 0;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: -15px;
|
|
|
|
|
left: 65px
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-enquiry .sweep_code .code {
|
|
|
|
|
background: #FFF;
|
|
|
|
|
text-align: center;
|
|
|
|
|
box-shadow: 0 0 7px rgba(0, 0, 0, 0.4)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-enquiry .sweep_code .code img {
|
|
|
|
|
max-width: 400px;
|
|
|
|
|
max-height: 400px
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-enquiry .sweep_code .code p {
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
color: #666;
|
|
|
|
|
line-height: 30px
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$('.btn-enquiry-img').on('click', function() {
|
|
|
|
|
layer.open({
|
|
|
|
|
type: 1,
|
|
|
|
|
skin: 'layui-layer-rim', //加上边框
|
|
|
|
|
area: ['420px', '240px'], //宽高
|
|
|
|
|
content: '<img src="'+ $(this).data('url') + '" alt="">'
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
</script>
|