html - 如何使用媒体查询更改图像地图坐标
问题描述
我有一个图像映射,并进行了媒体查询,以便图像以特定宽度变化。如何编写代码以便更改新图像的坐标?
HTML
<img src="../images/journey-final-01.jpg" alt="journey" usemap="#journeymap">
<map id="map_ID" name="journeymap">
<area target="" alt="flag1" title="Milestone 1" href="" coords="1356,644,1482,809" shape="rect">
<area target="" alt="flag2" title="Milestone 2" href="" coords="808,595,900,710" shape="rect">
<area target="" alt="flag3" title="Milestone 3" href="" coords="1361,320,1431,405" shape="rect">
<area target="" alt="flag4" title="Milestone 4" href="" coords="1124,161,1190,248" shape="rect">
<area target="" alt="cap" title="DDA" href="" coords="1173,110,1359,5" shape="rect">
</map>
CSS
body img{
width: 100vw;
height: 100vh;
}
@media only screen and (max-width: 600px) {
body img {
content: url("../images/journey-mobile-01.jpg");
}
}
解决方案
推荐阅读
- laravel - Laravel 5.6 file not found in storage
- java - All Branches are missing in junit
- azure - Azure Kubernetes 服务创建额外的资源组
- javascript - Transformation of inner function in javascript (bind())
- wso2 - remove xml declaration in payload response
- wordpress - How to add 'Pay with stripe ' payment method on website
- javascript - 将变量作为参数传递给 angularjs 中的 setInterval 函数
- sip - How to allow or passthrough a (re)invite in Freeswitch dialplan
- uima - Uima Ruta StringList
- r - 如何将只有一年的日期转换为R中格式为“年-月-日”的日期