非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。
msZoomTo
method scrolls and/or zooms an element to its specified coordinate with animation.
Zoomed elements can expose their zoom level through
msContentZoom
(ie. scrollTop/Left). The zoom level can be reset with
msZoomTo
.
This proprietary method is specific to Internet Explorer and Microsoft Edge.
Element.msZoomTo(arguments);
args [in]
Type: MSZoomToOptions
contentX [in]: The x-coordinate of the content that is the target of the scroll/zoom. If no value is specified, defaults to the current centerpoint of visible content, horizontally.
contentY [in]: The y-coordinate of the content that is the target of the scroll/zoom. If no value is specified, defaults to the current centerpoint of visible content, vertically.
viewportX [in]: The alignment point of the viewport. The scroll/zoom operation attempts to align this point with the contentX point.
viewportY [in]: The alignment point of the viewport. The scroll/zoom operation attempts to align this point with the contentY point.
scaleFactor [in]: Floating-point. The scale factor (msContentZoomFactor) to zoom to. If no value is specified, defaults to the current zoom level (no additional zoom occurs).This argument is ignored if the element is not zoomable.
animate [in]: The type of animation to use.
This method has no scrolling effect on non-scrollable elements and no zooming effect on non-zoomable elements (e.g., elements with "-ms-content-zooming: none").
This method has no effect if called from a parent document to scroll or zoom content hosted in an iframe.
This method does not return a value.
/* Zooming in on an element while still keeping it centered in the viewport */
var args = {
contentX: target.offsetLeft + target.offsetWidth/2;
contentY: target.offsetTop + target.offsetHeight/2;
scaleFactor: 2.0;
}
zoomer.msZoomTo(args);
元素
accessKey
属性
childElementCount
children
classList
className
clientHeight
clientLeft
clientTop
clientWidth
currentStyle
firstElementChild
id
innerHTML
lastElementChild
localName
名称
namespaceURI
nextElementSibling
onfullscreenchange
onfullscreenerror
openOrClosedShadowRoot
outerHTML
prefix
previousElementSibling
runtimeStyle
scrollHeight
scrollLeft
scrollLeftMax
scrollTop
scrollTopMax
scrollWidth
shadowRoot
slot
tabStop
tagName
after()
animate()
append()
attachShadow()
before()
closest()
computedStyleMap()
createShadowRoot()
getAttribute()
getAttributeNames()
getAttributeNode()
getAttributeNodeNS()
getAttributeNS()
getBoundingClientRect()
getClientRects()
getElementsByClassName()
getElementsByTagName()
getElementsByTagNameNS()
hasAttribute()
hasAttributeNS()
hasAttributes()
hasPointerCapture()
insertAdjacentElement()
insertAdjacentHTML()
insertAdjacentText()
matches()
msZoomTo()
prepend()
querySelector()
querySelector()
querySelectorAll()
querySelectorAll()
releasePointerCapture()
remove()
removeAttribute()
removeAttributeNode()
removeAttributeNS()
replaceWith()
requestFullscreen()
requestPointerLock()
scroll()
scrollBy()
scrollIntoView()
scrollIntoViewIfNeeded()
scrollTo()
setAttribute()
setAttributeNode()
setAttributeNodeNS()
setAttributeNS()
setCapture()
setPointerCapture()
toggleAttribute()