gpt4 book ai didi

css - HTML5,在所有元素上 Canvas

转载 作者:太空宇宙 更新时间:2023-11-04 14:16:27 29 4
gpt4 key购买 nike

我有以下代码:

<html>
<head>
<title>convas</title>
</head>

<body>

<canvas width="1745" height="569" style="width: 1730px; height: 1680px; position: absolute; z-index: 1"></canvas>

<div id="container">
html elemets (buttons, links)
</div>

</body>
</html>

Canvas 在 div 元素上,但任何按钮或链接都不起作用。


请检查我的例子:

http://jsfiddle.net/58WC6/2/

它需要将图像链接与飘落的雪花放在一起。

最佳答案

我假设您想将 Container 放在 Canvas 上?

http://jsbin.com/eNUdUvAg/4/

float 容器并设置 Z-Index。

<canvas width="1745" height="569" style="width: 1730px; height: 1680px; position: absolute; z-index: -1; background-color:red;"></canvas>

<div id="container" style="z-index:99 float:left;">
<button />

关于css - HTML5,在所有元素上 Canvas ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20327390/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com