如何在此代码中添加链接和可下载文件?

时间:2017-10-27 16:27:51

标签: html css

嘿,我希望你们能帮助我吗?我正在尝试编辑它,并且需要能够在有人单击按钮时添加URL。还有下载文件的能力。我会为此添加什么?

                <div class="optin" data-lb="editable-optional">
                <div class="shadow"></div>
                <img src="img/books-small.png" class="minor-image" />
                <p>Enter your email to download the guide</p>
                <div>
                    <input id="header-button" type="submit" value="Free Instant Access »" onclick="javascript:return false"/>

2 个答案:

答案 0 :(得分:1)

只需使用下载代码即可。您可以在标签内添加图像。

GET

答案 1 :(得分:0)

使用&lt; div&gt; W3C标准不推荐使用s。 为什么不使用超链接&lt; a&gt;标记:

<a href=" https://www.w3schools.com/css/css_link.asp">Free Instant Access »</a>

您可以使用CSS样式制作超链接&lt; a&gt;看起来像一个buttom (取自W3Schools):

a:link, a:visited {
    background-color: #f44336;
    color: white;
    padding: 14px 25px;
    text-align: center; 
    text-decoration: none;
    display: inline-block;
}

a:hover, a:active {
    background-color: red;
}
相关问题