一旦我在两个标签中的小空间中使用了内联块,我对display:inline-block
有点困惑。当我使用float: left
时,它工作正常。
任何想法为什么在inline-block
中找到空格。
.main {
padding-top:40px;
padding-left: 40px;
}

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="main">
<span class="btn btn-primary">Primary</span>
<span class="btn btn-success">Success</span>
</div>
&#13;
答案 0 :(得分:1)
这样做的一种方式是:
- building for production...
[at-loader] Checking started in a separate process...
[at-loader] Ok, 1.317 sec.
Hash: 3be42f85ac92a975a792
Version: webpack 2.5.1
Time: 31485ms
Asset Size Chunks Chunk Names
index.html 5.74 kB
vendor.js 2.23 MB 0 vendor
client.js 349 kB 1 client
styles.js 1.37 kB 2 styles
client.js.gz 86.7 kB
vendor.js.gz 444 kB
WARNING in ./~/angular2-datatable/~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
71:15-36 Critical dependency: the request of a dependency is an expression
WARNING in ./~/angular2-datatable/~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
87:15-102 Critical dependency: the request of a dependency is an expression
ERROR in Error: Child compilation failed:
Module parse failed: M:\cms\assets\images\_logo_files\logo_small.png Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file):
SyntaxError: Unexpected character '�' (1:0)
- compiler.js:76
[cms_authors]/[html-webpack-plugin]/lib/compiler.js:76:16
- Compiler.js:296 Compiler.<anonymous>
[cms_authors]/[webpack]/lib/Compiler.js:296:10
- Compiler.js:499
[cms_authors]/[webpack]/lib/Compiler.js:499:13
- Tapable.js:202 next
[cms_authors]/[tapable]/lib/Tapable.js:202:11
- CachePlugin.js:62 Compiler.<anonymous>
[cms_authors]/[webpack]/lib/CachePlugin.js:62:5
- Tapable.js:206 Compiler.applyPluginsAsyncSeries
[cms_authors]/[tapable]/lib/Tapable.js:206:13
- Compiler.js:496
[cms_authors]/[webpack]/lib/Compiler.js:496:10
- Tapable.js:195 Compilation.applyPluginsAsyncSeries
[cms_authors]/[tapable]/lib/Tapable.js:195:46
- Compilation.js:649 self.applyPluginsAsync.err
[cms_authors]/[webpack]/lib/Compilation.js:649:19
- Tapable.js:195 Compilation.applyPluginsAsyncSeries
[cms_authors]/[tapable]/lib/Tapable.js:195:46
- Compilation.js:640 self.applyPluginsAsync.err
[cms_authors]/[webpack]/lib/Compilation.js:640:11
- Tapable.js:202 next
[cms_authors]/[tapable]/lib/Tapable.js:202:11
- UglifyJsPlugin.js:230 Compilation.compilation.plugin
[cms_authors]/[webpack]/lib/optimize/UglifyJsPlugin.js:230:5
- Tapable.js:206 Compilation.applyPluginsAsyncSeries
[cms_authors]/[tapable]/lib/Tapable.js:206:13
- Compilation.js:635 self.applyPluginsAsync.err
[cms_authors]/[webpack]/lib/Compilation.js:635:10
- Tapable.js:195 Compilation.applyPluginsAsyncSeries
[cms_authors]/[tapable]/lib/Tapable.js:195:46
ERROR in ./app/_services/hash.service.ts
Module not found: Error: Can't resolve 'sha256' in 'M:\cms\app\_services'
@ ./app/_services/hash.service.ts 10:0-17
@ ./app/_services/index.ts
@ ./app/app.module.js
.main {
padding-top:40px;
padding-left: 40px;
}