|
第19行【ball_1.style.color = '#F40'】和第55行【transition: all 1s 0s;】在真机上没有效果,开发工具内的实时预览有效果
- <template name='tpl'>
- <view class="page">
- <view class="top">
- <text class="ball_t ball_1" id="ball_1">任务奖</text>
- <text class="ball_t ball_2" id="ball_2">活跃奖</text>
- <text class="ball_t ball_3" id="ball_3">团队奖</text>
- <text class="ball_t ball_4" id="ball_4">达人奖</text>
- <text class="ball_t ball_5" id="ball_5">推广奖</text>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: 'tpl',
- apiready() {//like created
- let ball_1 = $('#ball_1')
- setTimeout(function () {
- ball_1.style.color = '#F40'
- }, 500)
- },
- data() {
- return {
- }
- },
- methods: {
- }
- }
- </script>
- <style>
- .page {
- height: 100%;
- }
- .top {
- position: relative;
- height: 300px;
- width: 100%;
- }
- .ball_t {
- background: linear-gradient(to bottom, #abdcff, #0396ff);
- font-weight: bold;
- font-size: 12px;
- line-height: 48px;
- text-align: center;
- width: 50px;
- border-radius: 50%;
- position: absolute;
- text-shadow: 1px 1px 3px #555;
- box-shadow: 0 0 6px 1px #808080;
- border: 1px solid #bbb;
- transition: all 1s 0s;
- }
- .ball_1 {
- top: 200px;
- left: 60px;
- }
- .ball_2 {
- top: 75px;
- left: 45px;
- }
- .ball_3 {
- top: 20px;
- left: 150px;
- }
- .ball_4 {
- top: 90px;
- left: 275px;
- }
- .ball_5 {
- top: 200px;
- left: 250px;
- }
- </style>
复制代码
|
|