#### cover-view
> 基礎庫 1.4.0 開始支持,低版本需做[兼容處理](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html)
覆蓋在原生組件之上的文本視圖,可覆蓋的原生組件包括`map`、`video`、`canvas`、`camera`,只支持嵌套`cover-view`、`cover-image`。
#### cover-image
> 基礎庫 1.4.0 開始支持,低版本需做[兼容處理](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html)
覆蓋在原生組件之上的圖片視圖,可覆蓋的原生組件同`cover-view`,支持嵌套在cover-view里。
| 屬性名 | 類型 | 默認值 | 說明 |
| ---- | ------ | ---- | ---------------------------------------- |
| src | String | | 圖標路徑,支持臨時路徑、網絡地址(1.6.0起支持)。暫不支持base64格式。 |
##### Bug & Tips
1. `tip`: 基礎庫 1.6.0 起支持css transition動畫,`transition-property`只支持`transform (translateX, translateY)`與`opacity`。
2. `tip`: 基礎庫 1.6.0 起支持css opacity。
3. `tip`: 基礎庫 1.9.0 起支持插在 `view` 等標簽下。在此之前只可嵌套在原生組件`map`、`video`、`canvas`、`camera`內,避免嵌套在其他組件內。
4. `tip`: 事件模型遵循冒泡模型,但不會冒泡到原生組件。
5. `tip`: 文本建議都套上cover-view標簽,避免排版錯誤。
6. `tip`: 只支持基本的定位、布局、文本樣式。不支持設置`單邊的border`、`background-image`、`shadow`、`overflow`等。
7. `tip`: 建議子節點不要溢出父節點
8. `tip`: 默認設置的樣式有:`white-space: nowrap;` `line-height: 1.2;` `display: block;`
**定制視頻播放元素**
```html
<video id="myVideo" src="http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400" controls="{{false}}" event-model="bubble">
<cover-view class="controls">
<cover-view class="play" bindtap="play">
<cover-image class="img" src="/res/img/home.png" />
</cover-view>
<cover-view class="pause" bindtap="pause">
<cover-image class="img" src="/res/img/test.png" />
</cover-view>
<cover-view class="time">00:00</cover-view>
</cover-view>
</video>
```
```js
Page({
onReady() {
this.videoCtx = wx.createVideoContext('myVideo')
},
play() {
this.videoCtx.play()
},
pause() {
this.videoCtx.pause()
}
})
```
```css
.controls {
position: relative;
top: 50%;
height: 50px;
margin-top: -25px;
display: flex;
}
.play,.pause,.time {
flex: 1;
height: 100%;
}
.time {
text-align: center;
background-color: rgba(0, 0, 0, .5);
color: white;
line-height: 50px;
}
.img {
width: 40px;
height: 40px;
margin: 5px auto;
}
```
:-: 
- 簡介
- 第一章 公眾號開發
- 使用微信JSSDK
- 接口權限配置
- 分享接口
- 隱藏按鈕項
- 微信支付
- 第二章 小程序開發
- 基礎知識
- 分包加載
- WXSS樣式表
- 配置
- app.json配置
- window
- tabBar
- page.json配置
- 邏輯層
- app.js
- 場景值
- page.js
- 初始化數據
- 生命周期函數
- 頁面相關事件處理函數
- 事件處理函數
- 頁面實例方法
- 路由
- 文件作用域
- 模塊化
- 視圖層
- 模板語法
- 列表渲染
- 條件渲染
- 模板
- 事件
- 引用
- WXS語法規范
- WXS數據類型
- WXS控制流程
- WXS基礎類庫
- 組件
- 視圖容器
- view
- scroll-view
- swiper
- movable-view
- cover-view
- 基礎組件
- icon
- text
- rich-text
- progress
- 表單組件
- button
- checkbox
- form
- input
- label
- picker
- picker-view
- radio
- slider
- switch
- textarea
- 導航組件
- navigator
- 媒體組件
- audio
- image
- video
- camera
- 地圖組件
- map
- 畫布組件
- canvas
- 開放能力
- web-view
- 自定義組件
- 組件模版和樣式
- Component
- 組件傳值
- 組件事件
- Behaviors
- 組件間關系
- 網絡請求
- wx.request
- 微信登錄
- 獲取 openid 和 unionid
- 獲取用戶信息
- 將 wx.request 封裝為 promise
- 上傳圖片接口封裝
- 數據存儲
- 存儲數據和讀取數據
- 獲取數據緩存信息
- 移除數據緩存
- 獲取用戶設置
- openSetting
- getSetting
- 第三章 小游戲開發
- 參考資料