Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.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
Asp.net 背景图像不显示,不重复_Asp.net_Css - Fatal编程技术网

Asp.net 背景图像不显示,不重复

Asp.net 背景图像不显示,不重复,asp.net,css,Asp.net,Css,我试图在ValidationSummary div(项目符号列表的左侧)中放置一个小图标。显示图像,但在使用时重复: background:url(Images/exclamation.png); 当我说: background:url(Images/exclamation.png) no-repeat 12px 30px; 我错过了什么 CSS: ASPX: *姓 背景图像:url('Images/惊叹号.png') background-repeat-x:无重复 背景重复y:无重复 还

我试图在ValidationSummary div(项目符号列表的左侧)中放置一个小图标。显示图像,但在使用时重复:

background:url(Images/exclamation.png);
当我说:

background:url(Images/exclamation.png) no-repeat 12px 30px;
我错过了什么

CSS:

ASPX:


*姓
背景图像:url('Images/惊叹号.png')

background-repeat-x:无重复


背景重复y:无重复

还可以定义背景图像的高度

.validationsummary
  {
   background:url(Images/exclamation.png) no-repeat 12px 30px;
   border:1px solid #b08b38;
   width:99%;   

    height: 200px; /* change it with your requirement */


  }
试一试


如果它起作用,请相应地定位您的背景。

只需在“背景”下使用“背景重复:无”;您是否尝试过在没有定位属性的情况下使用
no repeat
?您可能会将其移出屏幕。此外,屏幕上的validationsummary有多大?我使用css3.0。它没有“无”用于后台重复。我尝试使用0作为属性。尚未为验证摘要设置任何高度。此属性不可用。你指的是背景重复:重复-x不重复;这也不管用
.validationsummary
{
    background-image: url('Images/exclamation.png);
    background-repeat: no-repeat;
    background-position: left top; 
    background-size: 16px;
    padding-left: 20px; /* Depends on the size of the image - 16px + 4px actual padding to indent the text to the right of the image */
}
.validationsummary
  {
   background:url(Images/exclamation.png) no-repeat 12px 30px;
   border:1px solid #b08b38;
   width:99%;   

    height: 200px; /* change it with your requirement */


  }
.validationsummary
{
   background:url(Images/exclamation.png) no-repeat 0 0;
   border:1px solid #b08b38;
   width:99%;    
}
.validationsummary
{
    background-image: url('Images/exclamation.png);
    background-repeat: no-repeat;
    background-position: left top; 
    background-size: 16px;
    padding-left: 20px; /* Depends on the size of the image - 16px + 4px actual padding to indent the text to the right of the image */
}