我試圖用引導來解決樣式問題。我是前端開發新手,我希望你能幫助我解決這個特定的問題。我在淘汰員工名單上進行迭代。對於每位員工,我創建了一種包含3個部分的卡片:部分帶有名稱和按鈕, 圖片,常規信息。這是應該的樣子:在引導區域內放置引導按鈕
在藍色區域的WITE條紋是我畫出來的員工只是名字。
<section id="picturesSection" class="background-image" data-bind="foreach: { data: people, as: 'person'}">
<div class="cardPositioning panel panel-primary">
<div class="panel-heading my-panel-heading">
<h3 class="panel-title cardTitle" data-bind="text: person.Name"></h3>
<button type="button" class="btn btn-primary btn-xs removeButton fa fa-minus" ></button>
</div>
<header>
<!--<img width="256" height="256" src="app/Images/horse.jpg">-->
<img width="256" height="256" data-bind="attr:{src: 'app/' + person.srcImage}">
</header>
<footer>
<!-- $data.firstName-->
<p class="nameEmployeePos" data-bind="text: person.DateOfBirth"></p>
<p class="nameEmployeePos" data-bind="text: person.Role"></p>
<p class="nameEmployeePos" data-bind="text: person.Email"></p>
</footer>
</div>
</section>
而CSS
#picturesSection{
width: 100%; overflow: hidden;
}
.cardPositioning{
float: left;
margin:20px;
}
.background-image {
background-image: url("../Images/back.png");
width: 100%;
z-index: 10;
background-position-x: 1400px;
background-position-y: 400px;
background-repeat: no-repeat;
background-attachment: fixed;
}
.removeButton{
margin-bottom: 2px;
margin-left: 0px;
margin-right: 0px;
}
的問題是如何在按鈕中代表「減」圖標卡位置。我需要一個按鈕從數據庫中刪除僱員。我想在藍色空間的右上角有按鈕。 Bootstrap雖然在面板面板的主要類填充,我不想刪除,因爲僱員(我想保持)的名稱的位置。想知道如何儘可能解決這些問題。提前致謝!
Okey我看到了!按鈕到達右側..但它還沒有在右上角..可能是由於填充..想盡可能將它放在那裏 – Tarta
你現在可以看到我認爲這就是你需要的:) – Arshmeet
I已編輯代碼 – Arshmeet