小编K. *_*ven的帖子

更改在 IE 11 中不起作用的 DIV 的旋转速度,使用 JS 更新 CSS 动画属性

我正在尝试使用简单的按钮更改 DIV 的旋转速度。它适用于 Chrome,但不适用于 IE。这是IE的限制吗?

var speed = 3;
document.getElementById("speedText").innerHTML = speed + "s";

function changeSpeed(change) {
  speed = speed + change;
  document.getElementById("speedText").innerHTML = speed + "s";
  document.getElementById("rotationDiv").style.animationDuration = speed + "s";
  $("#rotationDiv").load(location.href + " #rotationDiv");
}
Run Code Online (Sandbox Code Playgroud)
#rotationDiv {
  width: 200px;
  height: 200px;
  background-color: blue;
  animation-name: spin;
  animation-duration: 3s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="rotationDiv"></div>
<p id="speedText"></p>
<button id="button1" onclick="changeSpeed(-1)">Speed Up</button>
<button id="button2" …
Run Code Online (Sandbox Code Playgroud)

html javascript css internet-explorer

3
推荐指数
1
解决办法
1192
查看次数

配置并运行蓝牙后运行脚本 - Rasperry Pi 3

我正在尝试在启动时使用蓝牙自动调用程序.但是,在配置和运行蓝牙之前,将调用该程序.

我试过用两种方式调用程序:

  1. 使用init.d中的脚本并使用update-rc.d在init中使用此行注册: # Required-Start: $all
  2. 从/etc/rc.local调用它

这些都不能按预期工作.它们都启动程序,但在配置并运行蓝牙之前.

在蓝牙之后强制脚本或程序运行的最佳方法是什么?

下面是引导顺序中的一些选择行,因此您可以看到我遇到的问题:

[ OK ] Started Login Service.
[ OK ] Started Getty on tty1.
**Where my program is currently executing**
[ OK ] Started Configure Bluetooth Modems connected by UART.
[ OK ] Reached Target Bluetooth
**Where I want my program to be executing**

Raspbian GNU/Linux 8 tty1
login:
Run Code Online (Sandbox Code Playgroud)

bluetooth raspberry-pi raspbian raspberry-pi3

2
推荐指数
1
解决办法
2387
查看次数