示例:https://jsfiddle.net/cstsyw3s/1/
使用:
transform: translate(100%,100%)
我查看了http://www.w3.org/TR/css3-transforms,但找不到它在那里提到 – 我只能找到像变换原点,“百分比:参考边界框的大小”,我认为边界框可能是矩形元素的宽度和高度. (不包括任何边框)…但除了SVG和表格之外,我找不到边界框的定义.
解决方法
Percentages: refer to the size of bounding Box
边界框的定义是(source)
A bounding Box is the object bounding Box for all SVG elements without an associated CSS layout Box and the border Box for all other elements. The bounding Box of a table is the border Box of its table wrapper Box,not its table Box.
边框是(source)
The width and height properties include the padding and border,but not the margin. Note that padding and border will be inside of the Box e.g. .Box {width: 350px; border: 10px solid black;} lead to a Box rendered in the browser of width: 350px.
我希望这有帮助
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。