Commit 6c9520e2 by 肖康

打印图片问题

parent 9c29d7c3
Showing with 39 additions and 0 deletions
<link href="/css/style.css" rel="stylesheet">
<style>
body{background:#fff;}
.layui-btn{
display: inline-block;
height: 38px;
line-height: 38px;
padding: 0 18px;
background-color: #009688;
color: #fff;
white-space: nowrap;
text-align: center;
font-size: 14px;
border: none;
border-radius: 2px;
cursor: pointer;
}
</style>
<div class="dybox">
@foreach($html as $item)
{!! $item !!}
@endforeach
</div>
<script src="../../../../js/jquery-2.2.1.js"></script>
<script type="text/javascript">
$(function(){
$(".huabuitem[type='6'],.huabuitem[type='7']").each(function(){
var urlo_=$(this).css("backgroundImage").replace('url(','').replace(')','');
$(this).css({"background":""})
$(this).html("<img src='"+urlo_.substring(1,urlo_.length-1)+"' />");
$(this).find("img").css({width:"100%",height:"100%"})
})
// setTimeout(function(){
// window.print();
// }, 100);
})
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment