【发布时间】:2014-09-12 13:59:53
【问题描述】:
我最近安装了 DevExtreme(来自 Dev Express 网站),因为我正在寻找一种为多个移动设备创建单一解决方案的方法(该软件允许这样做)。创建了一个“基本”Typescript 项目后,我觉得无法让它工作真是太白痴了!
下图显示了与预期效果类似的内容:
但是,我在为某些设备复制此内容时遇到了一些困难。例如,windows Phone 会自动执行此操作,而 IOS 设备则不会,并且保持“正常”状态。 :(
我按照here 的建议复制了所有内容,但仍然文本框拒绝为我“发光”!
我的脚本:
<script>
$(function () {
$("#glow-trigger").on('click', function (e) {
var glower = $('.glow');
window.setInterval(function () {
glower.toggleClass('active');
}, 1000);
});
});
</script>
我的 CSS:
.glow {
background-color: #ccc;
border: 1px solid transparent;
-webkit-transition: border 0.1s linear, box-shadow 0.1s linear;
-moz-transition: border 0.1s linear, box-shadow 0.1s linear;
transition: border 0.1s linear, box-shadow 0.1s linear;
}
.glow.active {
border-color: blue;
-webkit-box-shadow: 0 0 5px blue;
-moz-box-shadow: 0 0 5px blue;
box-shadow: 0 0 5px blue;
}
“实践”HTML:
<div class="home-view" data-options="dxContent : { targetPlaceholder: 'content' } ">
<br />
<p class="hovertest">
<button id="myButton" onclick="sayHello()"> this is a button</button>
</p>
<br />
<h1>this is a heading</h1>
<br />
<h2>another heading</h2>
<br />
<a id="glow-trigger" href="#tomytextbox">Click Me</a>
<p>this is normal text</p><div data-bind="dxTextBox: {}"></div>
<div id="tomytextbox">
<input class="glow" type="text" />
</div>
<div data-bind="dxMultiView: { height: 300, items: [{ text: 'Drag me to left' }, { text: 'drag me to right' }] }"></div>
</div>
如果我做错了什么蠢事,请告诉我!
谢谢:)
【问题讨论】:
标签: css textbox typescript devextreme