gpt4 book ai didi

css - 使用 CSS 和 CoffeeScript 添加按钮

转载 作者:太空宇宙 更新时间:2023-11-04 16:14:21 26 4
gpt4 key购买 nike

我想将“添加您的”更改为一个按钮。

文本代码在这里

addMorePhotosButton = $ """
<div style="float:left;font-size:32px">
<br>
Everyone's photos from
"<span class="jvreplacewitheventname">this event</span>"
<a class="jvaddmorephotosbutton" href="#">+Add yours!</a>
<br/>
</div>
"""

addMorePhotosInfoDiv.append addMorePhotosButton

我将按钮本身的 CSS 添加到正确的 CSS 文件中,我只需要知道要在上面放置什么代码才能使其正确呈现。

您可以在此处看到我希望按钮出现的链接:

http://www.albumpl.us/gallery/trial/photos

最佳答案

你有两个选择:

  1. 使用<button>标记而不是 <a> .我不推荐这样做,因为有一些烦人的跨浏览器与 <button> 的视觉外观不一致。 s.
  2. (推荐)为 <span 设置样式/<a>使用您的 CSS 标记,使它们看起来像按钮。在 Google 上搜索“css button”以查看一些常用方法。

关于css - 使用 CSS 和 CoffeeScript 添加按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7815500/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com