【发布时间】:2015-09-04 01:07:18
【问题描述】:
我希望在 twitter bootstrap 3 网站的表单内添加一个闪烁的插入符号/光标。有一个用于 html 和 css 的代码笔,但如果代码与引导程序一起使用,我需要有关在何处添加代码的帮助?我是新手,渴望学习,但我浏览了又浏览,没有得到任何结果。
codepen 在这里 http://codepen.io/ArtemGordinsky/pen/GnLBq
html
<span class="blinking-cursor">|</span>
css
.blinking-cursor {
font-weight: 100;
font-size: 30px;
color: #2E3D48;
-webkit-animation: 1s blink step-end infinite;
-moz-animation: 1s blink step-end infinite;
-ms-animation: 1s blink step-end infinite;
-o-animation: 1s blink step-end infinite;
animation: 1s blink step-end infinite;
}
@keyframes "blink" {
from, to {
color: transparent;
}
50% {
color: black;
}
}
@-moz-keyframes blink {
from, to {
color: transparent;
}
50% {
color: black;
}
}
@-webkit-keyframes "blink" {
from, to {
color: transparent;
}
50% {
color: black;
}
}
@-ms-keyframes "blink" {
from, to {
color: transparent;
}
50% {
color: black;
}
}
@-o-keyframes "blink" {
from, to {
color: transparent;
}
50% {
color: black;
}
}
【问题讨论】:
-
您希望将其添加到哪里?输入字段?
-
在用户输入电子邮件地址的表单内,例如在占位符“输入电子邮件地址”之前