例如:
p + p {
/* Some declarations */
}
Run Code Online (Sandbox Code Playgroud)
我不知道是什么+意思.这与仅定义p没有的风格有什么区别+ p?
正如您从下面的示例中看到的,我有一个黑色背景和红色链接,以强调点击它时链接上显示的点状边框问题.我补充说border-style:none但似乎没有任何影响.是否有其他方法可以在单击链接时删除链接周围出现的虚线边框?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
html, body
{
height: 100%;
margin: 0;
padding: 0;
font-weight:normal;
font-size:12pt;
font-family: Verdana, Arial, Helvetica, serif, sans-serif;
background:black;
}
#linksouter
{
margin: 0;
padding: 0;
border-style:solid;
border-width:0px;
position:absolute;
top: 0px;
left: 0px;
width: 80px;
text-align:left;
}
#linksinner
{
margin: 80px 0 0 .5em;
width:100%;
display:inline;
height:100%;
}
#linksinner a
{
color:red;
text-decoration: none;
display:block;
margin: 5px 0 …Run Code Online (Sandbox Code Playgroud) 我有一个带有链接的div.我正在用<br>标签将它们排在另一个之上,因为我无法弄清楚如何用CSS添加垂直间距.我尝试在样式规则中添加底部边距和底部填充,但它似乎没有任何影响(为什么?).我可以添加另一个<br>标签来分隔它们,但我必须假设有一个更好的方法来使用CSS,我只是无法弄清楚.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
html, body
{
height: 100%;
margin: 0;
padding: 0;
font-weight:normal;
font-size:12pt;
font-family: Verdana, Arial, Helvetica, serif, sans-serif;
background:lime;
}
#linksouter
{
margin: 0;
padding: 0;
border-style:solid;
border-width:0px;
position:absolute;
top: 0px;
left: 0px;
width: 80px;
background: blue;
text-align:left;
}
#linksinner
{
margin: 80px 0 0 .5em;
width:100%;
background:fuchsia;
display:inline;
height:100%;
}
#linksinner a
{
color:red;
text-decoration: …Run Code Online (Sandbox Code Playgroud)