你可以在<asp:Image控件中設一個函數,先取得客戶機的分辨率,然後根據這個分辨率返回不同的圖片的url就可以了.

解决方案 »

  1.   

    vb.net 中
     Private Sub SetPicture()        Dim desktopSize As Size        '定义桌面大小的
            Dim strPicFile As String        ' 图片的路径和名称
            desktopSize = System.Windows.Forms.SystemInformation.PrimaryMonitorSize   '取得桌面的大小
            Select Case desktopSize.Width
                Case "640"
                    strPicFile = Application.StartupPath.ToString & "\main1.jpg"
                Case "800"
                    strPicFile = Application.StartupPath.ToString & "\main2.jpg"
                Case "1024"
                    strPicFile = Application.StartupPath.ToString & "\main3.jpg"
                Case Else
                    strPicFile = Application.StartupPath.ToString & "\main3.jpg"
            End Select        Dim ctl As Control        For Each ctl In Me.Controls
                If TypeOf ctl Is MdiClient Then
                    ctl.BackgroundImage = Image.FromFile(strPicFile)
                End If
            Next
        End Sub
      

  2.   

    用一个判断就行,screen.height和screen.width就可得出结果
      

  3.   

    <script language='javascript'>
    if (screen.width == 640){/*Load code or page image for 640 x 480 */}
    else if (screen.width <= 800){/*Load code or page image for 800 x 600 */}
    else if (screen.width <= 848){/*Load code or page image for 848 x 480 */}
    else if (screen.width <= 1024){/*Load code or page image for 1024 x 768 */}
    else if (screen.width <= 1152){/*Load code or page image for 1152 x 846 */}
    else if (screen.width <= 1200){/*Load code or page image for 1200 x 800 */}
    else){/*Load code or page image for 1600 x 1200 */}
    </script>
      

  4.   

    <script language='javascript'>
    if (screen.width == 640){document.body.style.background = "imgurl";}
    else if (screen.width <= 800){document.body.style.background = "imgurl";}
    ...