gpt4 book ai didi

javascript - Webiopi 多按钮 css

转载 作者:行者123 更新时间:2023-11-28 08:06:22 25 4
gpt4 key购买 nike

我想用不同颜色更改按钮的背景颜色,但最终会在按钮和 .bd 中出现重叠的 css

Javascript:

var restart = webiopi().createMacroButton("macro", "restart", "myMacroWithoutArgs1");
$("#restart").append(restart);
var shutdown = webiopi().createMacroButton("macro", "shutdown", "myMacroWithoutArgs2");
$("#shutdown").append(shutdown);
var schedule_set = webiopi().createMacroButton("debug", "debug");
$("#debug").append(schedule_set);
var back = webiopi().createMacroButton("back", "หน้าหลัก");
$("#back").append(back);

CSS:

    <style type="text/css">
button {
display: block;
margin: 5px 5px 5px 5px;
width: 160px;
height: 45px;
font-size: 24pt;
font-weight: bold;
color: white;
}
.bd{
display: block;
margin: 5px 5px 5px 5px;
width: 160px;
height: 45px;
font-size: 24pt;
font-weight: bold;
box-shadow: 3px 4px 0px 0px #1564ad;
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #79bbff), color-stop(1, #378de5));
background:-moz-linear-gradient(top, #79bbff 5%, #378de5 100%);
background:-webkit-linear-gradient(top, #79bbff 5%, #378de5 100%);
background:-o-linear-gradient(top, #79bbff 5%, #378de5 100%);
background:-ms-linear-gradient(top, #79bbff 5%, #378de5 100%);
background:linear-gradient(to bottom, #79bbff 5%, #378de5 100%);
background-color:#666666;
}
</style>

HTML:

<div id="debug"
onClick="self.location='debug.html'">
</div>
<div id="restart"></div>
<div class="bd" id="shutdown"></div>
<div id="back"
onClick="self.location='index.html'">
</div>

希望有人能告诉我如何正确解决这个问题?谢谢

最佳答案

请查看此帖子,其中包含您要查找的代码 http://www.coderewind.com/2015/10/build-a-raspberry-pi-wifi-rc-car/我在一个 div 上堆叠了控件。

关于javascript - Webiopi 多按钮 css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29468775/

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