Adding space between buttons?(在按钮之间添加空间?)
问题描述
您好,我这里有一个代码,除了一件事之外,它都是完美的.代码中每个按钮之间没有空格.我试过保证金,但不幸的是它是一个无序列表,所以我有点困惑.我会添加或替换什么以在两个按钮之间留出空间.帮助??:(
Hi I have a code here that is all perfect except one thing. There is NO space between each button in the code. I've tried margin, but unfortunately its an unordered list so I am a bit confused. What would I add or replace to have space between the two buttons. Help?? :(
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<style type="text/css">
.rollovericons a#terms{
display: block;
width:138px;
height:27px;
background: url(http://icpy.webs.com/button/Terms.png) no-repeat;
}
.rollovericons a:hover#terms{
background: url(http://icpy.webs.com/button/Terms0.png) no-repeat;
}
.rollovericons a#contact{
display: block;
width:138px;
height:27px;
background: url(http://icpy.webs.com/button/contact.png) no-repeat;
}
.rollovericons a:hover#contact{
background: url(http://icpy.webs.com/button/contact0.png) no-repeat;
}
</style>
<body>
<div class="rollovericons">
<a href="http://www.twitter.com" id="terms"></a>
<a href="http://www.twitter.com" id="contact"></a>
</div>
</body>
推荐答案
随便做吧:
.rollovericons a{
margin: 10px;
}
这将为 rollovericons
类中的每个 <a>
项目添加边距.
That will add a margin to every <a>
item inside the rollovericons
class.
这篇关于在按钮之间添加空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在按钮之间添加空间?


- 如何显示带有换行符的文本标签? 2022-01-01
- 如何调试 CSS/Javascript 悬停问题 2022-01-01
- 我不能使用 json 使用 react 向我的 web api 发出 Post 请求 2022-01-01
- 从原点悬停时触发 translateY() 2022-01-01
- 是否可以将标志传递给 Gulp 以使其以不同的方式 2022-01-01
- 为什么我的页面无法在 Github 上加载? 2022-01-01
- 使用 iframe URL 的 jQuery UI 对话框 2022-01-01
- 在不使用循环的情况下查找数字数组中的一项 2022-01-01
- 如何向 ipc 渲染器发送添加回调 2022-01-01
- 为什么悬停在委托事件处理程序中不起作用? 2022-01-01