亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

js滑塊取最大值和最小值問題

js滑塊取最大值和最小值問題

拉風的咖菲貓 2019-03-13 17:12:42
const minwidth = (this.$refs.progress.clientWidth / barwidth + this.percentum) * this.percentmax // 10 - 90const maxwidth = this.$refs.progress.clientWidth / barwidth * this.percentmax // 0 - 80minwidth 滑動取到的是10-90,maxwidth 滑動取到的是0-80 ,怎么取10-80
查看完整描述

1 回答

?
搖曳的薔薇

TA貢獻1793條經驗 獲得超6個贊

minwidth = (minwidth-10) * (8/9) + 10;

maxwidth = maxwidth * (8/9) + 10;

可以拿已知的這個范圍通過計算換算成目標范圍啊


查看完整回答
反對 回復 2019-03-16
  • 1 回答
  • 0 關注
  • 498 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號