fix comparison image height calculation
This commit is contained in:
parent
87e54ff9ec
commit
ccf84eb031
@ -928,8 +928,11 @@ h1 {
|
||||
.comparison-container {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
max-width: min(90vw, calc(100vh - 200px));
|
||||
max-height: min(90vw, calc(100vh - 200px));
|
||||
/* 固定尺寸,避免子元素高度计算错误 */
|
||||
width: min(90vw, calc(100vh - 200px));
|
||||
height: min(90vw, calc(100vh - 200px));
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e5e7eb;
|
||||
@ -963,10 +966,13 @@ h1 {
|
||||
}
|
||||
|
||||
.original-image {
|
||||
position: relative;
|
||||
/* 和 result-image 一样使用 absolute,确保填充 comparison-container */
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1;
|
||||
width: auto;
|
||||
height: auto;
|
||||
/* clip-path 通过内联样式动态设置,用于裁剪显示区域 */
|
||||
|
||||
img {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user