测试代码高亮

本文展示了如何使用C#编写代码,并通过jQuery实现页面高度自适应功能,确保网页内容随浏览器窗口大小变化而调整。
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Detail.aspx.cs" Inherits="A_AdminFile_Detail" ValidateRequest="false" Debug="true" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        *{
            margin: 0;
            padding: 0;
        }
        body {
            font-size: 16px;
            font-family: Arial Helvetica sana-serif,"宋体";
            color: #3e3e3e; margin:10px;
        } 
        .text{border:solid #ccc 2px; height:20px; line-height:20px; width:200px;font-family:Courier New; background-color:#C8E6CC}
        .btn{ height:35px; width:80px; font-size:16px; cursor:pointer;}
        .left{ float:left;}
        .right{ float:right;} 
    </style>
     
    <script src="jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">

        $(function () {
            var winHeight = 0;
            if (window.innerHeight)
                winHeight = window.innerHeight;
            else if ((document.body) && (document.body.clientHeight))
                winHeight = document.body.clientHeight;
            //alert(winHeight); //1440
            winHeight -= 70;
            $("#textDetail").css("height", winHeight);
        });
    </script>

</head>
<body>
<form id="form1" runat="server">
<div>

<pre>
    <% =ShowCode() %>
</pre>

</div>
</form>
</body>
</html>

 

转载于:https://www.cnblogs.com/studingASPNet/p/4639077.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值