正如您在我的代码中看到的那样,我的项目(我的意思是Links部门)没有,而是在外部部门(我的意思是PopularSearch部门)中浮动,这两个部门的样式如下所示。
.PopularSearch {
width: 80%;
height: 80px;
float: right;
margin-right: 120px;
margin-top: 50px;
margin-bottom: 50px;
border: 1px solid black;
}
.Links {
width: 80px;
height: 45px;
float: right;
border-radius: 3px;
border: 5px solid #00d363;
}
<div class="PopularSearch">
<div class="links">خلاقیت</div>
<div class="links">فروش</div>
<div class="links">مدیریت</div>
<div class="links">ایده</div>
<div class="links">نرم افزار</div>
</div>
这是因为div的类是“链接”,但是css试图将样式添加到带有大写L的“链接”的类名中。小写和大写字母在html中很重要,因此“链接”不会等于“链接”。
As you see in my code,my items(I mean ,Links division) does not ,float right in the outer division(I mean,PopularSearch division),the styles for both division ,are shows below.
.PopularSearch {
width: 80%;
height: 80px;
float: right;
margin-right: 120px;
margin-top: 50px;
margin-bottom: 50px;
border: 1px solid black;
}
/* lowered the case for "L" */
.links {
width: 80px;
height: 45px;
float: right;
border-radius: 3px;
border: 5px solid #00d363;
}
<div class="PopularSearch">
<div class="links">خلاقیت</div>
<div class="links">فروش</div>
<div class="links">مدیریت</div>
<div class="links">ایده</div>
<div class="links">نرم افزار</div>
</div>