Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/hadoop/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 如何设置具有放大功能的响应图像?_Css_Html_Responsive Design - Fatal编程技术网

Css 如何设置具有放大功能的响应图像?

Css 如何设置具有放大功能的响应图像?,css,html,responsive-design,Css,Html,Responsive Design,比如说,我有一个1920年的png标志,标志的中心有一条底线,一直延伸到图像的末尾。。。在桌面视图中,这是查看的最佳方式。。但当它进入媒体时,图像会缩小,因此图像中心的徽标会变得太小。。这是一个例子 在桌面视图上 关于移动视图 所以我的问题是,有没有办法使图像的中心部分在媒体设备上可缩放?在这种情况下,您可以使用css3属性。 例如: .logo { -webkit-transform: scale(1.5); transform: scale(1.5); /* you can

比如说,我有一个1920年的png标志,标志的中心有一条底线,一直延伸到图像的末尾。。。在桌面视图中,这是查看的最佳方式。。但当它进入媒体时,图像会缩小,因此图像中心的徽标会变得太小。。这是一个例子

在桌面视图上

关于移动视图


所以我的问题是,有没有办法使图像的中心部分在媒体设备上可缩放?

在这种情况下,您可以使用css3属性。
例如:

.logo {
   -webkit-transform: scale(1.5);
    transform: scale(1.5); /* you can change the value also */
   -webkit-transform-origin: center;
    transform-origin: center;
}

将此代码用于移动设备查看端口。

在这种情况下,您可以使用css3属性。
例如:

.logo {
   -webkit-transform: scale(1.5);
    transform: scale(1.5); /* you can change the value also */
   -webkit-transform-origin: center;
    transform-origin: center;
}

将此代码用于移动设备查看端口。

请使用媒体查询将您的徽标正确显示为

@media (min-width:321px) and (max-width: 770px)
{
 #logo
 {
  height:80px;
  width:80px;
 }
}

请使用媒体查询将您的徽标正确显示为

@media (min-width:321px) and (max-width: 770px)
{
 #logo
 {
  height:80px;
  width:80px;
 }
}

请共享您的代码…'.img responsive{width:100%;height:auto;}'根据信息尝试此为父div和子映像提供100%的宽度{width:auto;max width:100%;height:auto;}请共享您的代码…'.img responsive{width:100%;height:auto;}'根据信息尝试此为父div和子映像提供100%的宽度{宽度:自动;最大宽度:100%;高度:自动;}感谢“向上投票”:)感谢“向上投票”: