html - 将链接粘贴到背景图像上的特定区域
问题描述
我正在建立一个网站,我希望背景图像的某些区域具有一些动态文本。所以我创建了一个具有以下样式的 DIV:
html {
background: url(pics/main-bg2_1280.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover; }
.thediv { height: 16%;
width: 16%;
position: fixed;
top: 14%;
left: 6%; }
但是当窗口调整大小时 div 会稍微移动
有什么方法可以确保 div 始终在同一个位置,而不管窗口大小和比例(宽度 x 高度)如何
谢谢
解决方案
推荐阅读
- r - 当它们具有不同的精度时,bind_rows() 舍入数据
- php - 如何在 laravel 中使用 SQL 组合不同数据库中的两个不同表
- javascript - 来自获取数据的 Alpine JS 数据绑定组件
- java - 如何读取带有一组标题的 CSV 但写入不同的组?
- grammar - CFG 解析树 - 最右边的推导
- sql - 如果我在选择时使用星号,我的查询会更快。为什么要这样做。我正在使用 Postgres
- excel - 不要复制另一个工作簿中现有多列的行
- cmd - 如何在文件名中包含通配符的 WIndows 中重命名文件
- jquery - jQuery:向内联样式函数添加重要内容
- python - 使用 make install 的 Ambertools20 编译错误