cover-view.nvue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <view>
  3. <video ref="video" id="myVideo" class="video" :src="src" controls="true">
  4. <cover-view class="coverview" style="overflow-y: scroll;">
  5. <text class="text">{{ '\uEA06\uEA0E\uEA0C\uEA0A 我是可以滚动的cover-view 我是可以滚动的cover-view 我是可以滚动的cover-view 我是可以滚动的cover-view 我是可以滚动的cover-view 我是可以滚动的cover-view 我是可以滚动的cover-view 我是可以滚动的cover-view 我是可以滚动的cover-view' }}</text>
  6. </cover-view>
  7. </video>
  8. </view>
  9. </template>
  10. <script>
  11. export default {
  12. data() {
  13. return {
  14. title: 'cover-view',
  15. src: "https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20181126-lite.m4v"
  16. }
  17. },
  18. onLoad() {
  19. },
  20. methods: {
  21. }
  22. }
  23. </script>
  24. <style>
  25. .content {
  26. text-align: center;
  27. height: 400rpx;
  28. }
  29. .logo {
  30. height: 200rpx;
  31. width: 200rpx;
  32. margin-top: 200rpx;
  33. }
  34. .title {
  35. font-size: 36rpx;
  36. color: #8f8f94;
  37. }
  38. .text {
  39. color: #4CD964;
  40. font-family: unincomponents;
  41. }
  42. .video {
  43. width: 750rpx;
  44. height: 400rpx;
  45. background-color: #808080;
  46. }
  47. .coverview {
  48. position: absolute;
  49. left: 0;
  50. right: 0;
  51. top: 0rpx;
  52. height: 150rpx;
  53. border-width: 10rpx;
  54. border-color: #4CD964;
  55. }
  56. </style>