我想Google Material Icon
在按钮悬停上更改(实际图标本身).我想只用HTML
和做这个CSS
.我希望它从"加号"图标变为类似"检查"图标的东西,特别是使用"完成"图标.Codepen下面.谢谢
.material-icons.md1 {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
font-size: 33px;
margin-top: 12px;
}
.btnwrap {
position: fixed;
z-index: 2;
height: 60px;
width: 300px;
background-color: #074fb2;
font-size: 20px;
display: block;
text-align: center;
vertical-align: middle;
line-height: 60px;
color: #fff;
border-radius: 50px;
cursor: pointer;
}
.btntext1 {
position: absolute;
left:85px;
transition: all .1s;
}
.btntext2 {
position: absolute;
width: 100%;
transition: all .2s;
opacity: 0;
}
.innerbtn {
z-index: 1;
position: relative;
float: …
Run Code Online (Sandbox Code Playgroud) 我想将其显示为:4:26 PM。
但我不断得到的是:04:26 PM。
如果我删除的小时和分钟options
距离toLocaleTimeString()
,它的工作原理,但它也显示秒,这是我不想要的。
myClock();
function myClock() {
var d = new Date().toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'});
document.getElementById("clock").innerHTML = d;
}
setInterval(myClock, 1000);
Run Code Online (Sandbox Code Playgroud)
<div id="clock"></div>
Run Code Online (Sandbox Code Playgroud)