我想在照片部分和文本部分之间画一条水平线作为中断。
这是我的网站:
这是它工作的jsfiddle:
<script type="text/javascript">
var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
ctx.moveTo(0,0);
ctx.lineTo(980,0);
ctx.stroke();
</script>
我已经把它放在了头上。这是我的html:
<!-- CONTENT____________________________________________-->
<div class="content_wrapper">
<!-- Photo __________________________________________-->
<div class="home_photo">
</div>
<canvas id="myCanvas" width="980" height="100" style="border:0px solid #d3d3d3;"></canvas>
<!-- About___________________________________________________-->
<div class="home_text">
<p>Emma Carmichael is a writer and editor based in Brooklyn, NY, although she hails from Brattleboro, VT. Emma graduated from Vassar College in 2010 with a degree in Urban Studies; ETC...
</p>
</div>
</div>
它显然在做某事,因为元素之间有额外的空间。有任何想法吗?
谢谢!