Javascript 不带';t在下禁用内容
我想把红色边框定义的画布放在它下面的div(黑色边框)上。它应该与div大小相同。我还希望能够单击按钮并选择画布下的文本。 我已经试着这样做了两天了,但是我想不出来 您需要指定:Javascript 不带';t在下禁用内容,javascript,html,css,canvas,Javascript,Html,Css,Canvas,我想把红色边框定义的画布放在它下面的div(黑色边框)上。它应该与div大小相同。我还希望能够单击按钮并选择画布下的文本。 我已经试着这样做了两天了,但是我想不出来 您需要指定: canvas { pointer-events:none; } 这是一个js提琴,您可以在其中测试单击红框下方的黑框区域: 你能发布你的css吗?看起来可能有边距或填充问题。 html { position: relative; min-height: 100%; } body { /* Margi
canvas {
pointer-events:none;
}
这是一个js提琴,您可以在其中测试单击红框下方的黑框区域:
你能发布你的css吗?看起来可能有边距或填充问题。
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
margin-top: 50px; /* Required margin for .navbar-fixed-top. Remove if using .navbar-static-top. Change if height of navigation changes. */
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
background-color: #f5f5f5;
}
/* Custom page CSS
-------------------------------------------------- */
/* Not required for template or sticky footer method. */
body > .container {
padding: 60px 15px 0;
}
.container .text-muted {
margin: 20px 0;
}
.footer > .container {
padding-right: 15px;
padding-left: 15px;
}
code {
font-size: 80%;
}
.jumbotron
{
text-align: center;
}
#canvas-container
{
padding: 0;
//position: absolute;
border: 1px solid black;
}
.jumbotron
{
padding: 0;
#position: absolute;
}
canvas {
border: 1px solid red;
}
canvas {
pointer-events:none;
}