我有一个包含许多行的表.其中一些行是class="highlight"并且表示需要以不同方式设置样式并突出显示的行.我要做的是在这些行之前和之后添加一些额外的间距,使它们看起来与其他行稍微分开.
我以为我可以完成这件事,margin-top:10px;margin-bottom:10px;但它不起作用.任何人都知道如何完成这项工作,或者是否可以完成?这是HTML,我已经在tbody中设置了第2个tr到类突出显示.
<table>
<thead>
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>Value1</td>
<td>Value2</td>
</tr>
<tr class="highlight">
<td>Value1</td>
<td>Value2</td>
</tr>
<tr>
<td>Value1</td>
<td>Value2</td>
</tr>
<tr>
<td>Value1</td>
<td>Value2</td>
</tr>
</tbody>
</table>
Run Code Online (Sandbox Code Playgroud) 这是我的代码 - 这适用于chrome,firefox和safari ..我在Windows 7上测试过它但是在IE 8和Opera浏览器中,下面的代码不起作用而不是显示带圆圈的图像我得到的是方形图像
<div id="hotspot-img1-0">
<ul>
<img class="proimg" src="http://profile.ak.fbcdn.net/hprofile-ak-snc4/276311_100002617687873_1118195351_n.jpg" title="web" style="width:100px;height:100px;background:#fff;border:2px solid #ccc;-moz-border-radius:52px;-webkit-border-radius:52px;">
</ul>
</div>
CSS
#hotspot-img1-0{
top: 570px;
left: 67px;
height: 104px;
width: 104px;
border-top-left-radius: 52px;
border-top-right-radius: 52px;
border-bottom-right-radius: 52px;
border-bottom-left-radius: 52px;
box-shadow: 0px 2px 5px 0px;
border-top-color: rgb(255, 255, 255);
border-left-color: rgb(255, 255, 255);
border-right-color: rgb(255, 255, 255);
border-bottom-color: rgb(255, 255, 255);
border-top-width: 2px;
border-left-width: 2px;
border-right-width: 2px;
border-bottom-width: 2px;
border-top-style: solid;
border-left-style: solid;
border-right-style: solid;
border-bottom-style: solid
}
Run Code Online (Sandbox Code Playgroud) 可能重复:
C宏并在括号中使用参数
我发现这个宏观问题非常有趣.
如果以下代码定义为宏
#define MULT(x, y) x * y
Run Code Online (Sandbox Code Playgroud)
并且函数调用为int z = MULT(3 + 2, 4 + 2);.期望输出为3 + 2 = 5且4 + 2 = 6且5*6为30.
但返回的输出是13.它需要3 + 2*4 + 2.因此,根据运算符的优先级,它首先计算2*4.
这是什么修复?如果像这样的小功能哪一个有效?定义功能还是使用宏?