如题,设置div border-top无效,该如何解决?????????????????????????
没搞明白什么意思,是只设置了上边框,如何边框是图片?
下面代码是可以的,是不是你那边其他样式的影响
<script src="http://html2canvas.hertzen.com/dist/html2canvas.js" type="text/javascript"></script>
<div id="capture" style="padding: 10px; background: lightgreen;border-top:thick solid #ff0000;">
<h4 style="color: #000; ">Hello world!</h4>
</div>
<br/>
<script>
html2canvas(document.querySelector("#capture")).then(canvas => {
document.body.appendChild(canvas)
});
</script>