阅读背景:

如何根据浏览器类型设置按钮图像

来源:互联网 

I'm using ASP.NET with a C# backend, and want to have a site show different images for mobile and desktop version. I figured I could do this with CSS, but can't figure out how. I have the different css files set up and working for other elements, but for these ImageButtons, I have some bad behavior. If I don't set the ImageUrl attribute, it does what I need but puts "Search" and a gray outline around my buttons since it is looking for the nonexistent ImageUrl Path. If I do set the ImageUrl attribute as shown below, the text and box go away, but the image won't change as I need them to. I have tried this with a and img tags and LinkButtons but have gotten the same results both ways. What is the best way to change the size and image of these buttons if the user is accessing via a mobile device?I'm using ASP.NET with a C# backend, and want t




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: