This commit is contained in:
qianguyihao
2019-06-14 11:35:23 +08:00
parent 3d97313732
commit 5d8bf5c079
4 changed files with 61 additions and 5 deletions

View File

@@ -235,9 +235,34 @@ Object.assign(this.dataObj, dataObj);
尤其要研究一下 `vertical-align: middle;`这个属性。
### 2019-05-30
### 2019-06-11
已知某背景图片的尺寸是586 * 931。现只截图图片的上面一部分区域586 * 810做展示。代码实现如下
标签部分:
```html
<div class="img"> </div>
```
css部分重点是 background 属性的写法)
```css
.img{
width: 586rpx;
height: 810rpx;
background: url('https://img11.360buyimg.com/jdphoto/s586x931_jfs/t1/27766/15/3237/102443/5c258955Ee307620e/21a744b0d2e065b3.png') 0 0/cover no-repeat;
margin: 0 auto;
}
```
`arr1.push(arr2)` 和