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

鍍金池/ 問答/ HTML5問答

1.配置host,域名指向本機(jī),如果是80端口的話,mac需要sudo
2.樓上的

練命 回答

演示程序

$(document).ready(function () {
        var Country = function (name,cities) {
            this.name = name;
            this.cities = cities;
        };
        var countries = [];
        countries.get = function (name) {
            for(var i = 0; i < this.length; i++) {
                if(this[i].name == name) {
                    return this[i];
                }
            }
            return null;
        };
        countries.add = function (name,city_name) {
            var country = this.get(name);
            if(country) {
                country.cities.push(city_name);
            }  else {
                country = new Country(name,new Array(city_name));
                countries.push(country);
            }
        };
        $("#table tbody tr").each(function () {
            var tds = $(this).find("td");
            var name = tds[1].innerHTML;
            var city_name = tds[2].innerHTML;
            countries.add(name,city_name);
        });
        $("#table tbody tr").remove();
        var str = "";
        for(var i =0; i < countries.length; i++) {
            var name = countries[i].name;
            var cities = countries[i].cities;
            var len = cities.length;
            for(var j =0 ;j < len; j++) {
                if(j == 0) {
                    str += "<tr><td rowspan='"+len+"'>"+(i+1)+"</td><td rowspan='"+len+"'>"+name+"</td><td>"+cities[j]+"</td></tr>";
                } else {
                    str += "<tr><td>"+cities[j]+"</td></tr>";
                }
            }
        }
        $("#table tbody").append(str);
    });
維她命 回答

<!DOCTYPE html>
<html>
<head>

<title></title>
<meta charset="utf-8">
<style type="text/css">
    
    *{
        margin:0;
        padding:0;
    }

    #box{
        width:800px;
        height:100px;
        position:relative;
        overflow: hidden;
    }

    ul{
        list-style: none;
        position:absolute;
        width:2000px;
        left:0; 
        top:10px;
    }

    ul li{
        width:200px;
        height:100px;
        background:#ccc;
        float: left;
        margin:5px;
    }

    .red{
        background:red;
    }

    .blue{
        background: blue;
    }

    .green{
        background: green;
    }

</style>

</head>
<body>

<div id="box">


<ul id="ul">
    <li></li>
    <li class="red"></li>
    <li class="blue"></li>
    <li class="green"></li>
</ul>

</div>

<script>

var ul = document.getElementById("ul");
var lis = ul.getElementsByTagName("li");
var len = lis.length;
var width = len 2 210; // li的寬度+margin
var html = ul.innerHTML; // ul的內(nèi)容

// 動態(tài)設(shè)置ul內(nèi)容和width
html += html;
ul.innerHTML = html;
ul.style.width = width + 'px';

setInterval(function(){

var left = ul.offsetLeft;

if(-left == width - 800){
    left = -(width / 2 - 800);
}

ul.style.left = --left + "px";

},1000 / 60)

</script>

</body>
</html>
這是我的例子,你可以參考一下

冷眸 回答

<style type="text/css">

.filtered {
    -webkit-filter: blur(5px);
    /* Chrome, Safari, Opera */
    filter: blur(5px);
    background: black;
    width: 200px;
    height: 200px;
}

</style>
<div class="filtered"></div>

獨特范 回答

你的意思是在5秒內(nèi)不停執(zhí)行a,b,c,d中的一個,然后下一個5秒又隨機(jī)換一個,不停循環(huán)?
這個一般控制一些展示效果,要求a,b,c,d等均能隨便打斷,且又可以進(jìn)入。

fns=[a,b,c,d];
t=5*1000;
while(true){
    var datein=Date().now();
    fn=fns[ Math.floor(Math.random()*4) ];
    while(Date.now()-datein < t){
        (fn)();
    }    
}
替身 回答
<span style="display:inline-block;height:20px;width:20px;border-radius:50%;padding:1px;background:#ABC;text-align:center"> 
1
</span>
款爺 回答

雙指放大就像用放大鏡來看一樣, ctrl++/-縮放頁面將引起頁面的重排重繪與媒體查詢

flex-wrap換行,控制flex是單行或者多行。同時橫軸的方式?jīng)Q定了新行堆疊的方向

別傷我 回答

1.你這是要在微信里自動播放嗎?自動播放要加上autoplay="autoplay"
2.要看你js代碼的位置,你如果放在head里是沒法生效的
3.微信的ready現(xiàn)在不知道還是不是這樣判斷的,你可以在ready事件里加一些代碼看看ready事件有沒有觸發(fā)

clipboard.png

心癌 回答

IE9 不支持animation 其他的部分css3還可以 你用-ms-transform:scale兼容一下吧

久礙你 回答

好吧,找到解決方法了

@value: 1px 2px 3px 4px;

div{
    padding: e(replace("@{value}", px, rem));
}
女流氓 回答

【CSS】固定在底部的頁腳

        body {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            margin: 0;
        }
        main {
            flex: 1;
        }
        header { text-align: center; height: 3em; }
        main, footer {
            display: block;
            padding: .5em calc(50% - 400px);
        }
        footer {
            background: linear-gradient(#222, #444);
            color: white;
        }
短嘆 回答

while(true) 當(dāng)然是死循環(huán)了, 沒有為什么

敢試 回答

用一個特定的元素或class做序號容器,然后你就可以為所欲為了···

法克魷 回答

不建議用這段JS了

也就是傳統(tǒng)的rem方案
如果非要用,用成熟的 Flexible
https://github.com/amfe/artic...

最好的方案

PostCSS postcss-px-to-viewport

就是專門為解決設(shè)計稿和手機(jī)網(wǎng)頁適配CSS問題,在寫CSS的時候,直接寫px,會編譯成vw vh,完全不用費心去考慮換算的問題,有什么比按照原設(shè)計稿寫px更爽的事情?
https://www.w3cplus.com/css/v...

這文章是Flexible作者寫的,他都轉(zhuǎn)向了PostCSS 你們還守著這段落后又難用的JS做什么?

淺淺 回答

我記得是有appid的,后臺可以用一套系統(tǒng),根據(jù)appid返回對應(yīng)平臺的數(shù)據(jù)

孤毒 回答

不推薦直接把vue實例中data直接作為請求參數(shù),最好用$data原始數(shù)據(jù)或者loadsh深復(fù)制一份數(shù)據(jù),否則會有些奇奇怪怪的現(xiàn)象

悶騷型 回答

好幾天了,我也遇到這個問題呢