jQuery 屏蔽输入 : How do I animate the appearance of the text?

标签 jquery html css

Codepen link (点击输入)

我想做的是在应用了transition 的出现的文本上添加某种opacity。但看起来没有任何类或包装器,插件也没有为此提供 API。

有什么方法可以为此制作流畅的动画吗?

最佳答案

您可以使用 CSS 过渡。看这里:http://codepen.io/anon/pen/pJMoGj

input {
    color: #FFF;
}
input:focus {
    color: #000;
    -webkit-transition: color 1s ease-in-out;
    -moz-transition: color 1s ease-in-out;
    -ms-transition: color 1s ease-in-out;
    -o-transition: color 1s ease-in-out;
    transition: color 1s ease-in-out;
}

关于jQuery 屏蔽输入 : How do I animate the appearance of the text?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32165441/

相关文章:

javascript - 将 setValue 和 getValue 添加到 JQueryUI 自动完成

html - 使用网格系统堆叠在一起的卡片

html - 显示 : inline-block vs display: table (no display: table-cell)

javascript - 跟踪哪个列表元素被点击并将此数据传输到 PHP

css - Angular :元素自动滚动

javascript - 元视口(viewport)和 Android 的问题

JavaScript 对绝对定位元素从底部到每个原始位置进行动画处理

javascript - 如何让 jQuery 在当前选项卡而不是新选项卡中打开页面

Jquery 图像从右到左滑动

javascript - 在按钮内渲染 SVG 图标?