删除CSS中的边框
我想删除“新内容”和“膳食想法”之后的额外边框,我尝试在删除CSS中的边框,css,html,css-selectors,pseudo-element,Css,Html,Css Selectors,Pseudo Element,我想删除“新内容”和“膳食想法”之后的额外边框,我尝试在中选择第一个孩子,而不是,但它甚至不起作用 html{ 背景色:白色; } 身体{ 背景色:白色; 保证金:0自动; 宽度:960px; 字体系列:arial、helvetica、无衬线字体; } a{ 文字装饰:无; 颜色:#373535; } 标题{ 背景色:#ede6e6; 高度:150像素; 填充顶部:20px; } 保险商实验室{ 填充:0; } 李{ 显示:内联; 填充:10px; 字体大小:16px; } 李:第一个孩子{
中选择第一个孩子,而不是
,但它甚至不起作用
html{
背景色:白色;
}
身体{
背景色:白色;
保证金:0自动;
宽度:960px;
字体系列:arial、helvetica、无衬线字体;
}
a{
文字装饰:无;
颜色:#373535;
}
标题{
背景色:#ede6e6;
高度:150像素;
填充顶部:20px;
}
保险商实验室{
填充:0;
}
李{
显示:内联;
填充:10px;
字体大小:16px;
}
李:第一个孩子{
右边框:1px实心#373535;
右边填充:10px;
}
我的食谱
我的食谱
使用以下方法:
.Left ul li:last-child a,.Right ul li:last-child a {
border: none;
}
html{
背景色:白色;
}
身体{
背景色:白色;
保证金:0自动;
宽度:960px;
字体系列:arial、helvetica、无衬线字体;
}
a{
文字装饰:无;
颜色:#373535;
}
标题{
背景色:#ede6e6;
高度:150像素;
填充顶部:20px;
}
保险商实验室{
填充:0;
}
李{
显示:内联;
填充:10px;
字体大小:16px;
}
李:第一个孩子{
右边框:1px实心#373535;
右边填充:10px;
}
.左ul li:最后一个孩子a.右ul li:最后一个孩子a{
边界:无;
}
给你:
CSS:
我尝试了这段代码,但它在第二个列表项后仍然给了我一个边框,它应该只在这段代码的第一个子项上添加一个边框吗?
body {
background-color: white ;
margin: 0 auto;
width: 960px;
font-family: arial,helvetica,sans-serif;
}
a {
text-decoration: none;
color: #373535 ;
}
header {
background-color: #ede6e6;
height:150px;
padding-top: 20px;
}
ul {
padding: 0 ;
}
li{
display: inline;
padding: 5px;
margin: 5px;
font-size: 16px;
}
ul li:first-child {
border-right: 1px solid #373535;
padding-right: 10px;
width: 9%;
}