1 需要天氣api接口 請百度
2 需要根據(jù)天氣數(shù)據(jù)寫樣式
3 完成
可能你項目中也裝了cli,卸載掉
給彈窗后面加一個模態(tài)層,
使用Element.getBoundingClientRect()來獲取相對于viewport的位置,
2個元素top位置的差就是偏移量
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
body{
padding: 0;
margin: 0;
width: 100vw;
height: 100vh;
}
.container{
position: absolute;
left:10px;
top:10px;
width: 500px;
height: 500px;
background-color: #ffffff;
box-sizing: border-box;
border:1px solid #cccccc;
overflow: hidden;
}
.child{
width: 100%;
height: 200%;
background-color: red;
border: 1px solid red;
box-sizing: border-box;
}
.calcButton{
position: absolute;
left:0;
bottom:0;
width: 100px;
height: 50px;
box-sizing: border-box;
}
.child-wrapper{
position: absolute;
left:0;
right: 0;
top:0;
bottom:50px;
overflow-x: hidden;
overflow-y: auto;
}
</style>
</head>
<body>
<div class="container">
<div class="child-wrapper">
<div class="child"></div>
</div>
<button type="button" class="calcButton">計算</button>
</div>
<script>
document.querySelector(".calcButton").addEventListener("click",function(){
var childWrapperRect=document.querySelector(".child-wrapper") .getBoundingClientRect();
var childRect=document.querySelector(".child") .getBoundingClientRect();
this.innerText="當(dāng)前偏移-"+(childWrapperRect.top-childRect.top);
});
</script>
</body>
</html><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
#tableWrap{width: 488px;height: 300px;margin: 0 auto;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
overflow: hidden;
}
#tableWrap table{
width: 100%;height: 100%;
border-collapse: collapse;
border: 1px solid #000;
}
#tableWrap tr{height: 35px;}
#tableWrap tbody>tr>td{
border: 1px solid #000;
}
#tableWrap td{
width: 80px;
text-align: center;
font-size: 14px;
color: #000;
}
#tableWrap thead>tr{background: #f00;border: 1px solid #f00}
</style>
</head>
<body>
<div id="tableWrap">
<table cellspacing="0" cellpadding="0">
<thead>
<tr style="color: #fff;">
<th align="center" class="one">排名</th>
<th align="center" class="two">用戶</th>
<th align="center" class="three">手機(jī)號</th>
<th align="center" class="four">投資金額</th>
<th align="center" class="five">獎勵</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center" class="one num">dd</td>
<td align="center" class="one num">dd</td>
<td align="center" class="one num">dd</td>
<td align="center" class="one num">dd</td>
<td align="center" class="one num">dd</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>我的建議是后臺提供新的接口,返回所有項目的同時也返回其統(tǒng)計數(shù)據(jù)。
所用用戶都會有這個路徑?
如果很多網(wǎng)站都有這個現(xiàn)象,那估計是你chrome的某個插件導(dǎo)致的,插件是可以注入js代碼的,所以有可能在你打開的每個網(wǎng)站上都做一些操作,你可以挨個禁用chrome插件看看是哪個插件導(dǎo)致的。
四個角定各位個定位一個透明的方塊,方塊各加兩條邊
<style>
.item{
height: 50px;
width: 250px;
background: #ccc;
position: relative;
}
.item-horn{
position: absolute;
width: 20px;
height: 20px;
}
.item-left-top{
top: 0;
left: 0;
border-top: 2px solid red;
border-left: 2px solid red;
}
.item-right-top{
top: 0;
right: 0;
border-top: 2px solid red;
border-right: 2px solid red;
}
.item-left-bottom{
bottom: 0;
left: 0;
border-bottom: 2px solid red;
border-left: 2px solid red;
}
.item-right-bottom{
bottom: 0;
right: 0;
border-bottom: 2px solid red;
border-right: 2px solid red;
}
</style>
<div class="item">
<div class="item-horn item-left-top"></div>
<div class="item-horn item-right-top"></div>
<div class="item-horn item-left-bottom"></div>
<div class="item-horn item-right-bottom"></div>
</div>
看一下你代碼呢,應(yīng)該是綁定了一個對象作為key
this.move = function () {
this.clears();
this.draw();
var first = this.enemys[0];
var end = this.enemys[this.enemys.length - 1];
var speedX = 1;
if (this.enemys.length > 0 && (end.x + 50 + first.speedX > canvas.width
|| first.x + first.speedX < 0)) {
speedX *= -1;
}
for (let i = 0, leg = this.enemys.length; i < leg; i++) {
var enemy = this.enemys[i];
enemy.x += enemy.speedX;
enemy.speedX *= speedX;
}
requestAnimationFrame(this.move.bind(this));
}應(yīng)該是可以的啊
container為什么要設(shè)1000px的高度
安裝個vue-devtools:http://www.cnblogs.com/aaron-...
我猜是等比例縮放,
長圖大圖是顯示中間
我剛才試了一下是可以的啊。。。
Observable.fromEvent(window, "resize")
.debounceTime(100)
.subscribe((event: any) => console.warn(event.target.innerWidth));
你再檢查一下是不是哪里代碼寫的有問題?
</body>后邊不要再加頁面內(nèi)容了,但是強(qiáng)行加上的話,也不是說瀏覽器就不給渲染了,但總歸還是不能這么搞的不是?.load()可以加載HTML片段,你要加載的部分包起來加個ID,然后寫成.load('template.html #app')這種格式試試。<Route path="goods" component={Goods} />
<Route path="goods/:id" component={Goods} />
兩個路由對應(yīng)的component是一樣的啊,所以路由變了頁面內(nèi)容一樣
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
北大課工場是北京大學(xué)校辦產(chǎn)業(yè)為響應(yīng)國家深化產(chǎn)教融合/校企合作的政策,積極推進(jìn)“中國制造2025”,實現(xiàn)中華民族偉大復(fù)興的升級產(chǎn)業(yè)鏈。利用北京大學(xué)優(yōu)質(zhì)教育資源及背
博為峰,中國職業(yè)人才培訓(xùn)領(lǐng)域的先行者
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團(tuán)項目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗,技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。