【问题标题】:Preventing HTML canvas object selection防止 HTML 画布对象选择
【发布时间】:2012-12-26 00:06:29
【问题描述】:

我正在使用交互式动画自定义我的主页,但无法让它在页面中看起来更美观。请参阅http://geotheory.co.uk/。我想在用户单击页面时停止选择画布对象。动画是 Processing script,然后是 translated 到 javascript。 index.html 内容如下:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>geotheory.co.uk</title>
</head>
<body  id="home" bgcolor="#202020">
    <script src="processing-1.4.1.min.js"></script>
    <div id="canvasContainer">
    <canvas padding: 0 data-processing-sources="rectangles.pde"></canvas>
    </div>
</body>

感谢您的帮助。

【问题讨论】:

    标签: javascript html css


    【解决方案1】:

    是 :focus 伪类导致它。这应该可以解决它:

    canvas:focus{
        outline:none;
    }
    

    【讨论】:

      猜你喜欢
      • 2021-05-20
      • 2017-08-07
      • 2011-01-20
      • 2014-02-21
      • 1970-01-01
      • 2011-04-10
      • 1970-01-01
      • 2016-07-21
      • 1970-01-01
      相关资源
      最近更新 更多