Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.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
C# 图像控件小于图像大小_C#_Css_Asp.net - Fatal编程技术网

C# 图像控件小于图像大小

C# 图像控件小于图像大小,c#,css,asp.net,C#,Css,Asp.net,我有一个在页面上显示徽标的图像控件。图像为500 x 500像素,但当它出现在屏幕上时,控件会将其缩小到19x20。我不知道如何覆盖任何设置了较小大小的CSS,或者通常如何使其更大。如果我使用谷歌浏览器,检查然后编辑属性,我可以看到它应该是好的,我只是不能让它正常运行 以下是我的网站中的一些代码片段: ASPX: 生成的标记为: <img id="mainContentPlaceHolder_imgLogo" class="logoImage" skindid="btnCSV" src="

我有一个在页面上显示徽标的图像控件。图像为500 x 500像素,但当它出现在屏幕上时,控件会将其缩小到19x20。我不知道如何覆盖任何设置了较小大小的CSS,或者通常如何使其更大。如果我使用谷歌浏览器,检查然后编辑属性,我可以看到它应该是好的,我只是不能让它正常运行

以下是我的网站中的一些代码片段:

ASPX:

生成的标记为:

<img id="mainContentPlaceHolder_imgLogo" class="logoImage" skindid="btnCSV" src="../App_Themes/Main/images/logo.gif" align="middle" style="height:19px;width:20px;">


图像URL在代码隐藏中设置。

您的类定义缺少一个点。还可以尝试添加
!重要
属性:

.logoImage {
   width: 500px !important;
   height: 500px !important;
}
但一定要找出高度19px的位置;宽度:20px来自(可能来自
mainContentPlaceHolder
size或来自代码内分配)

<img id="mainContentPlaceHolder_imgLogo" class="logoImage" skindid="btnCSV" src="../App_Themes/Main/images/logo.gif" align="middle" style="height:19px;width:20px;">
.logoImage {
   width: 500px !important;
   height: 500px !important;
}