返回

html-如何修复和旋转窗口右侧的链接,而无需负位置?

发布时间:2022-04-11 14:52:06 298
# css# html

我有一个链接已经在窗口中旋转和固定。问题是,我不知道如何将它定位在右边,而不在右边添加一个负位置。

当改变屏幕尺寸时,右负位置不起作用,所以我需要找到另一种解决方案。。

有什么想法吗?

代码笔也可供参考。

.section {
  height: 100vh;
}

.section-one {
  background-color: #f8f9fa;
}
.section-two {
  background-color: #e9ecef;
}
.section-three {
  background-color: #dee2e6;
}
.section-four {
  background-color: #ced4da;
}

.fixed-link {
  position: fixed;
  top: 50%;
  /* Need to be fixed to right without adding a negative position right */
  right: 0;
  transform: translateY(-50%);
  transform: rotate(270deg);
  transform-origin: 0 0;
}


FIXED LINK
特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报
评论区(2)
按点赞数排序
用户头像
下一篇
javascript-返回数组中最大值的索引 2022-04-11 13:39:37