transform在CSS3中使用时,我有一种奇怪的行为.
这是我的代码:
*, *:before, *:after {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.btn_exchange a {
position: relative;
text-decoration: none;
display: block;
width: 150px;
float: left;
color: #ffffff;
font-size: 14px;
background: #0ea2d3;
box-shadow: 0 3px 0 0 rgba(7, 154, 190, 0.75);
text-align: center;
font-weight: bold;
}
@keyframes pulse {
0% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
100% {
transform: scale(1);
}
}
@-webkit-keyframes pulse {
0% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
100% …Run Code Online (Sandbox Code Playgroud)我有一个关于正则表达式的问题.我有这样的字符串
<input id="test_name" name="test_name" type="text" list="auto_search_complete" value="" placeholder="Search">
而我只想获得id价值test_name.在javascript中,我使用此代码
var str = '<input id="test_name" name="test_name" type="text" list="auto_search_complete" value="" placeholder="Search">';
var id = str.match(/id=\"\w+\"/g)[0].match(/\w{3,}/g);
Run Code Online (Sandbox Code Playgroud)
有没有其他方法可以将2个正则表达式函数组合成1个?
谢谢!