Files
2018-10-16 21:32:40 +05:30

56 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Add id Attributes to Bootstrap Elements
localeTitle: 将id属性添加到Bootstrap元素
---
## 将id属性添加到Bootstrap元素
最后一个挑战是你在按钮元素中添加了一个类这次你必须将id添加到具有良好类的div中。
### 提示1
id声明如下
```html
<element id="id(s)List"></element>
```
### 提示2
编辑具有良好类的div标签
### 提示3
对两个孔使用不同的id。
### 提示4
`left-well` ,井`right-well`
### 解
由于您必须向两个井添加id并且两者都具有唯一ID因此以下是解决方案
```html
<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<div class="well" id="left-well">
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
</div>
</div>
<div class="col-xs-6">
<div class="well" id="right-well">
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
</div>
</div>
</div>
</div>
```