如何重写此联系人按钮代码以使其正常工作
How do I re-write this contact button code so it works?
我的网站上有一个带有以下编码的联系按钮,但是它没有按预期打开电子邮件页面。我想知道是否有人能够帮助我重写代码以使其正常工作。
我希望保留现有的样式和 id。基本上我无法让它可悲地工作。
#contact-button{
border: none;
color: white;
padding-top: 7px;
padding-right: 33px;
padding-left: 28px;
padding-bottom: 8px;
text-align: center;
text-decoration: none;
display: inline-block;
font-style: lato;
font-size: 20px;
margin-top: 4px;
margin-right: 2px;
margin-left: 245px;
margin-bottom: 4px;
-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;
cursor: pointer;
opacity: 0.90;
border-radius: 3px;
}
#contact-button {
background-color: #F06000;
color: white;
}
#contact-button:hover {
color: white;
background-color: #A74200;
}
#mail-icon{
margin-top: 6px;
float: left;
margin-right: 6px;
}
<a href="mailto:#" id="contact-button">Message Me
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA3ElEQVQ4T6WTaw3CQBCEZxzgAHCAhEpAQnGAlKIAcIADQAFIQAIOhsxmr2lKQ0q7fy697Hw3+ygxMzhTD0qqAGgqyACLXwDOf0JqAEsDbgkQyd0YiKRT5q0CQLKStAfgcmqS7yGQpAWAI4A7ySa0BWCBJNsKUB+S4iuAA8lw8AXIyw2AxiCSz86dRXYXd2MAtmtHDotdVgsdBHRLSOElz22ebngzWEI20fb9SjQx60bv2+U9SB7aHuQYnVgs/5xmjtH7sy6L5MYUu2NWwTl+LPbAs58c83+myU+n8AOSyY9qfRA3mgAAAABJRU5ErkJggg==" alt="Mail Icon" id="mail-icon" />
</a>
只需删除邮件之前的空间:
mailto: joebloggs@gmail.com
应该是
mailto:joebloggs@gmail.com
片段
#contact-button{
border: none;
color: white;
padding-top: 7px;
padding-right: 33px;
padding-left: 28px;
padding-bottom: 8px;
text-align: center;
text-decoration: none;
display: inline-block;
font-style: lato;
font-size: 20px;
margin-top: 4px;
margin-right: 2px;
margin-left: 245px;
margin-bottom: 4px;
-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;
cursor: pointer;
opacity: 0.90;
border-radius: 3px;
}
#contact-button {
background-color: #F06000;
color: white;
}
#contact-button:hover {
color: white;
background-color: #A74200;
}
#mail-icon{
margin-top: 6px;
float: left;
margin-right: 6px;
}
<a href="mailto:joebloggs@gmail.com" id="contact-button">Message Me
</a>
相关文章:
- Javascript:selenium Web驱动程序isDisplayed()不工作
- jQuery UI自动完成突然停止工作
- AngularJS UI路由器不能像ng路由器那样工作
- HTML5音频加载和播放获胜'我不能在iPad上工作
- JavaScript打印功能使日历停止工作
- Javascript.getHours()工作不正常
- 为什么这在IE中的工作方式与在Firefox中不同
- 视频HTML没有'无法在Internet Explorer 11上工作
- 扩展移相器按钮类不工作
- Firebase迁移-简单的Firebase.set没有'不再工作了——旧的还是新的
- 谷歌地图不是以HTML显示,而是在JS Fiddle上工作
- 正在尝试使用if和else添加类,但无法正常工作
- Jquery FadeIn FadeOut 只工作一次
- Foreach无法在Typescript中工作
- 另一个ajax调用中的Jquery ajax调用在for循环中没有按预期工作
- 为什么不是't窗口.恢复正常工作吗?(javascript/jquery)
- JS可以在Chrome中工作,但不能在Firefox中工作
- ajaxToolkit PopupControlExtender不工作.过时的
- HTML标记在脚本标记中工作
- javascript扫雷器floodfill算法不能正常工作