在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/ HTML5問答
雨蝶 回答

找到一個simulate.js,可以模擬鍵盤和鼠標的點擊時間,簡單測試了下,似乎可以。

 var e = this.canvas;
 var t = jQuery.simulate.keyCode;
 //模擬down鍵
 $(e).simulate('keydown', {keyCode: t.DOWN})
  • 額,似乎可以,具體沒深究,放假回家了。。。。。。。。明年再看。
近義詞 回答

option配置里直接設置背景色就可以了

backgroundColor:"#fff",還可以寫rgb格式與漸變色

哚蕾咪 回答

ios 下的 fixed 是假的,感覺上是通過絕對定位做的東西
可以在body下絕對定位一個100%大小的div,來實現(xiàn)這種全屏的覆蓋
要注意的就是這時候的body就不能滾動了,得用div滾動
html

body
    div.fixed
    div.scroll

css

html,body,.scroll
    width:100%
    height:100%
    overflow:hidden
    position:relative
.scroll
    overflow:auto
.fixed
    position:absolute
    width:100%
    height:100%
笨小蛋 回答

1.Z-INDEX常用于同級之間比較
<div>

<div class="first common">
    i am the first div.

</div>

<div class="second common">
  i am the second div.

</div>

<div class="third common">
  i am the third div.
</div>

</div>

這樣的div結(jié)構(gòu)設置z-index,輕松愉快愉快。

2.像父子關(guān)系的,父元素不設置z-index,設置子元素為負值,即可實現(xiàn)父元素在上的效果

<div class="first common">

i am the first div.
<div class="second common">
  i am the second div.
</div>

</div>

夕顏 回答

addBomItem所在的js引入了嗎?

短嘆 回答

應該是哪個地方用錯了,之前我也寫過。建議 直接 把每個tab的內(nèi)容分開成單獨的組件

妖妖 回答

:header-cell-style="{'text-align':'center'}"

心癌 回答

http://jsbin.com/qubucufuya/4...

簡單寫了一下,為了方便,開始的塊,我定在了 90度的位置上,還有漸變色的處理也比較簡單,只是簡單的加色
寫這個只是為了表明 CSS是可以做到的,主要是確定位置有點麻煩,但是也是可以能過js算的

更新一下,在90度開始也是可以的,在js里判斷一下,把不要顯示的塊隱藏掉就可以了

http://jsbin.com/qubucufuya/6...

======================================更新
晚上閑來無事,又改了改,加上了 百分比顯示,只要更改render(60)函數(shù)中的數(shù)字,可以自定義百分比
http://jsbin.com/vigoxovofu/2...

離觴 回答

setTimeout 的毫秒數(shù)設置為 0 也不會立即執(zhí)行,瀏覽器會有最小延遲,大概 5s 10s 這樣。如果頁面加載的延遲比這個延遲大就會先執(zhí)行 setTimeout

別逞強 回答

CSS transform 屬性 , 只對 block 級元素生效!


另外你的多余樣式有很多,如span的寬高等,并不會生效。

毀憶 回答

dispatch ajax前將conent值設置為空。
這應該是最簡單的辦法了。

蟲児飛 回答
  1. 創(chuàng)建Application

    1. 創(chuàng)建WebView
    2. 將首頁設置到WebView中
  2. 打包Apk
  3. 上架
裸橙 回答

response.data不就可以了嗎?

初念 回答
但我把mounted改成created的時候會報Cannot read property 'appendChild' of null"

這是因為created的時候,Dom節(jié)點還沒有渲染出來到頁面上,這個時候是找不到id=wave的DIV的。


改成Vue的插件

import wavePng from './wave.png'
export default {
    install(Vue){
        Vue.directive('wave', {
            inserted: function(el){
                start(el)
            }
        })
    }
}
    var ctx;
    var waveImage;
    var canvasWidth;
    var canvasHeight;
    var needAnimate = false;

    function init (callback, wave) {
        // var wave = document.getElementById('wave');
        var canvas = document.createElement('canvas');
        if (!canvas.getContext) return;
        ctx = canvas.getContext('2d');
        canvasWidth = wave.offsetWidth;
        canvasHeight = wave.offsetHeight;
        canvas.setAttribute('width', canvasWidth);
        canvas.setAttribute('height', canvasHeight);
        wave.appendChild(canvas);
        waveImage = new Image();
        waveImage.onload = function () {
            console.log('000')
            waveImage.onload = null;
            callback(wave);
        }
        waveImage.src = wavePng;
    }

    function animate () {
        var waveX = 0;
        var waveY = 0;
        var waveX_min = -203;
        var waveY_max = canvasHeight * 0.7;
        var requestAnimationFrame = 
            window.requestAnimationFrame || 
            window.mozRequestAnimationFrame || 
            window.webkitRequestAnimationFrame || 
            window.msRequestAnimationFrame ||
            function (callback) { window.setTimeout(callback, 1000 / 60); };
        function loop () {
            ctx.clearRect(0, 0, canvasWidth, canvasHeight);
            if (!needAnimate) return;
            if (waveY < waveY_max) waveY += 1.5;
            if (waveX < waveX_min) waveX = 0; else waveX -= 3;
            
            ctx.globalCompositeOperation = 'source-over';
            ctx.beginPath();
            ctx.arc(canvasWidth/2, canvasHeight/2, canvasHeight/2, 0, Math.PI*2, true);
            ctx.closePath();
            ctx.fill();

            ctx.globalCompositeOperation = 'source-in';
            ctx.drawImage(waveImage, waveX, canvasHeight - waveY);
            
            requestAnimationFrame(loop);
        }
        loop();
    }

    function start (el) {
        console.log(1)
        if (!ctx) return init(start, el);
        needAnimate = true;
        setTimeout(function () {
            if (needAnimate) animate();
        }, 500);
    }
    function stop () {
        needAnimate = false;
    }

上述的代碼,把原先插件的閉包去掉了,因為這個改成vue的插件webpack打包完本身就是一個閉包了。
然后使用的話,就用指令的形式

<template>
  <div id="wave" class="wave" v-wave><span>60%</span></div>
</template>

<script>
import wave from './a'
export default {

}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.wave{width:200px;height:200px;overflow:hidden;border-radius:50%;background:rgba(255,203,103,.6);margin:100px auto;position:relative;text-align:center;display:table-cell;vertical-align:middle;}
.wave span{display:inline-block;color:#fff;font-size:20px;position:relative;z-index:2;}
.wave canvas{position:absolute;left:0;top:0;z-index:1;}
</style>

main.js

import Vue from 'vue'
import App from './App'
import router from './router'
import wave from './components/a'

Vue.config.productionTip = false
Vue.use(wave)
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})

這樣就可以了。

尤禮 回答
document.querySelectorAll('img[data-url]').forEach(item => {
    item.addEventListener('click', (img) => {
        document.getElementById('myvideo').src = img.getAttribute('data-url')
    })
})