我加入到我的網站谷歌的地方自動完成框。樣式表不適用於HTML嗎?
#pac-card.pac-card
div
#pac-title
| Autocomplete search
#type-selector.pac-controls
input#changetype-all(type='radio', name='type', checked='checked')
label(for='changetype-all') All
input#changetype-establishment(type='radio', name='type')
label(for='changetype-establishment') Establishments
input#changetype-address(type='radio', name='type')
label(for='changetype-address') Addresses
input#changetype-geocode(type='radio', name='type')
label(for='changetype-geocode') Geocodes
#strict-bounds-selector.pac-controls
input#use-strict-bounds(type='checkbox', value='')
label(for='use-strict-bounds') Strict Bounds
#pac-container
input#pac-input(type='text', placeholder='Enter a location')
,並有一個樣式定義:
.pac-card {
margin: 10px 10px 0 0;
border-radius: 2px 0 0 2px;
box-sizing: border-box;
-moz-box-sizing: border-box;
}
#pac-container {
padding-bottom: 12px;
margin-right: 12px;
}
我做包括頁面上的樣式表。樣式表不適用於HTML可能是什麼原因?
的代碼是正確的,因爲我嘗試了一下上的jsfiddle。
的是,在[哈巴狗(https://github.com/pugjs/pug)? –
@PatrickRoberts,是啊。無論如何,該CSS不會對DOM做很多改變。你有沒有(@ konyv12)試圖添加其他CSS的東西來顯示明顯的變化? – Wax