腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
getBoundingClientRect
不是
一个
函数
、
所以我像这样使用
getBoundingClientRect
function showCoords(canvas, event) { console.log("x: " + x + " y: " + y); 但是我得到了这个错误:"canvas.
getBoundingClientRect
不是
一个
浏览 1
提问于2018-01-17
得票数 13
回答已采纳
2
回答
c.
getBoundingClientRect
不是
一个
函数
我使用的是语义可见性,但是我有这个错误,我不知道将什么传递给
函数
参数 setOverlayRect({ overlayRect: _.pick(c.
getBoundingClientRect
(), 'height', 'width')name='mail' /> </Menu.Item>
浏览 1
提问于2019-12-13
得票数 0
回答已采纳
3
回答
element.
getBoundingClientRect
不是
一个
函数
、
为什么说是element.
getBoundingClientRect
is not a function?我真的不知道该怎么办。{ let element = elementsFadeIn[i]; let viewElement = element.
getBoundingClientRect
浏览 7
提问于2021-12-11
得票数 0
1
回答
Jest: nativeElement.
getBoundingClientRect
不是
一个
函数
、
、
我试图在我的应用程序测试中验证两个getBoudingClientRect
函数
的返回,但是当我试图验证第二个
函数
的返回时,我得到了
一个
错误。第
一个
是在我按ID搜索的HTMLElement中,到目前为止还可以。在测试中,我可以按照以下方式模拟您的返回:但是,第二个元素是ElementRef,我通过nativeElement访问他的信息,即使我试图以任何方式嘲笑他的返回,但当我试图在组件中获得这
浏览 1
提问于2020-12-11
得票数 1
3
回答
getBoundingClientRect
不是
vueJs上的
函数
、
、
我想找到
一个
div的顶部和底部的边缘当我移动我的光标在它之上。动态生成div。但是,它产生了错误消息。
getBoundingClientRect
不是
一个
函数
<template> <div v-for="(i, index) in divs" :key="index$refs["ref_" + i].
getBoundingClientRect
().top;
浏览 5
提问于2020-06-02
得票数 3
回答已采纳
1
回答
TypeError s.domNode.
getBoundingClientRect
不是
一个
函数
、
、
、
尝试在quill编辑器中提到@字符的用户,抛出TypeError,s.domNode.
getBoundingClientRect
不是
控制台中的
函数
,也没有显示建议。实际行为:在控制台中引发以下错误,建议不起作用浏览器:Chrome104.0.5112.101(官方版本
浏览 13
提问于2022-09-15
得票数 1
1
回答
addEventListener滚动TypeError: element.
getBoundingClientRect
不是
一个
函数
、
、
我得到了错误: // Get element's position in the viewport const bounding = element.
getBoundingClientRect
浏览 1
提问于2020-01-03
得票数 0
回答已采纳
1
回答
为什么我不能使用
getBoundingClientRect
()?
、
、
我试图写
一个
量角器测试,以检查页脚在页底。我看过这样的消息来源来帮助我:我想使用这些源中讨论的
getBoundingClientRect
函数
来获取页脚的位置,但是我收到了
一个
错误:footer.
getBoundingClientRect
functionfooter = element(by.css('lib-footer > mat-toolbar')); const viewportOffset = footer.
getBounding
浏览 0
提问于2019-07-22
得票数 1
回答已采纳
1
回答
.
getBoundingClientRect
()、每个()和$(this)之间的关系-为
一个
循环中的多个元素获取
getBoundingClientRect
、
考虑以下情况: console.log($(this).
getBoundingClientRect
());此代码引发以下错误:$('h2[id*="h-"]').each(function(el) { console.l
浏览 4
提问于2021-08-31
得票数 0
回答已采纳
3
回答
each: undefined中的
getBoundingClientRect
不是
函数
、
、
因此,当全屏部分在视口中时,我会尝试调用一些
函数
。假设我有7个截面,然后我希望当某个截面在视口中时发生一些事情(我有
一个
函数
可以将这些截面捕捉到视口中,因此视口中永远不会有多个截面,但我正在尝试找出哪个截面在视口中是可见的)。这里有
一个
小提琴: $("section").each(function () {
浏览 2
提问于2014-08-04
得票数 24
回答已采纳
2
回答
如何解析"element.
getBoundingClientRect
不是
函数
“
、
我有
一个
组件,当鼠标悬停在“个性化”-element上时,我想使用Office Fabric-react组件“标注”。 import * as Reac
浏览 1
提问于2018-08-22
得票数 11
3
回答
从
函数
获取变量值到其他
函数
javascript
、
我想从
一个
函数
得到另
一个
函数
的值。但我是javascript的新手,有人能帮我解决这个问题吗?我想将dinoRight、dinoLeft和另
一个
的值调用到cactus1move
函数
。const spawn = () => { const dinoRight = document.getElementById('dino').
getBoundingClientRect
().left('dino').
getBou
浏览 8
提问于2022-01-25
得票数 0
1
回答
如何在功能反应本机组件中找到组件位置?
、
、
我试图使用useRef和
getBoundingClientRect
() (参见下面的代码)。 // however, this does n
浏览 1
提问于2019-11-15
得票数 4
回答已采纳
2
回答
getBoundingClientRect
来自于iFrame
、
、
、
我有
一个
函数
来评估
一个
元素(
一个
iFrame)是否在视图中,如果该元素在视图中,它将返回true。function isElementInViewport() { var rect = el.
getBoundingClientRect
>= 0) && (elemBottom <= (window.innerHeight + window.innerH
浏览 0
提问于2018-10-30
得票数 5
回答已采纳
1
回答
如何用茉莉测试jquery选择器
、
、
我们需要测试
一个
计算元素顶部位置的
函数
。在下面的示例中,
一个
具有id 'test‘的元素。function xxx(){ return element[0].
getBoundingClientRect
().top;为了用茉莉测试这个
函数
,我们尝试了以下测试方法: name: 'test', <
浏览 1
提问于2018-02-14
得票数 1
回答已采纳
1
回答
相对于没有
getBoundingClientRect
的文档获取元素偏移量(Webkit bug)
、
、
、
、
定位工具提示/弹出通常只是使用
getBoundingClientRect
()或jQuery的偏移量()
函数
(在内部使用
getBoundingClientRect
)来获取相对于文档或窗口的偏移量,但是如果在某些Webkit浏览器上放大,这些
函数
开始返回意外/错误的结果,因为
getBoundingClientRect
函数
在Webkit中实现得很奇怪。这是
一个
永远存在的问题,而且由于某种原因从来没有得到解决。问:我(如果可能的话)如何计算
一个</e
浏览 3
提问于2016-11-05
得票数 3
1
回答
如何创建收集数组值作为参数传递的计数器?
、
、
、
、
我给
一个
按钮分配了
一个
函数
,该
函数
执行外部库方法以进行缩放。().width / 2; this.instance.smoothZoom(width, height, 2); 我试图作为第三个参数直接传递
一个
值数组,但是它返回了
一个</e
浏览 4
提问于2020-01-27
得票数 0
回答已采纳
2
回答
当我的元素到达屏幕底部时,如何停止setInterval
函数
?
、
、
、
、
我想要的是当第
一个
(.goccia)元素到达屏幕底部时,set interval
函数
停止。setInterval(spostaGocce, 30);document.querySelector('button').addEventListener('click', muoviti);gocciaTop = goccia.
getBoundingClientRect
().topif(gocc
浏览 4
提问于2020-02-26
得票数 0
1
回答
可以使用
getBoundingClientRect
设置元素的大小吗
、
我有
一个
在鼠标输入事件中调整大小的按钮。我想知道是否有可能根据从
getBoundingClientRect
().height收到的高度来调整它的大小。这就是我到目前为止尝试过的各种变体,但似乎都不起作用 let h = this.
getBoundingClientRect
().height= this.
getBoundingClientRect
().height) this.
getBoundingClientRect</
浏览 3
提问于2017-04-26
得票数 4
1
回答
当键盘出现时,Javascript
函数
getBoundingClientRect
()在移动设备上返回奇怪的结果(top =0
、
、
在使用JavaScript
getBoundingClientRect
()
函数
定位DIV时,我们遇到了
一个
问题。当键盘出现时,window.resize事件被触发,但是元素的
getBoundingClientRect
()返回top = 0,这并
不是
我所期望的。 有没有人跨越了同样的问题或解决方案?
浏览 0
提问于2015-02-25
得票数 0
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
腾讯会议
云直播
对象存储
活动推荐
运营活动
广告
关闭
领券