📄 css-style-general.aspx
字号:
<%@Page Language="VB"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head>
<title>Using CSS to Add Style to ASP Controls</title>
<style type="text/css">
body {font-family:Tahoma,Arial,sans-serif; font-size:10pt}
input {font-family:Tahoma,Arial,sans-serif; font-size:9pt}
.heading {font-family:Tahoma,Arial,sans-serif; font-size:14pt; font-weight:bold}
.subhead {font-family:Tahoma,Arial,sans-serif; font-size:12pt; font-weight:bold; padding-bottom:5px}
.cite {font-family:Tahoma,Arial,sans-serif; font-size:8pt}
</style></head>
<body bgcolor="#ffffff">
<span class="heading">Using CSS to Add Style to ASP Controls</span><hr />
<!--------------------------------------------------------------------------->
<form runat="server">
<ASP:Label id="MyASPLabel" runat="server"
Text="<%# MyValue %>"
BackColor = "yellow"
ForeColor = "blue"
ToolTip = "A yellow and blue label"
BorderStyle = "None"
Font-Name = "Tahoma"
Font-Size = "16pt"
Font-Bold = "True"
Font-Underline = "True"
/>
<p />
<ASP:TextBox id="MyASPText" runat="server"
Text="<%# MyValue %>"
BackColor = "red"
ForeColor = "black"
ToolTip = "A read and black text box"
BorderColor = "black"
BorderWidth = "1"
Font-Name = "Comic Sans MS"
Font-Size = "12pt"
Font-Bold = "True"
/>
<p />
<ASP:Button id="MyASPButton" runat="server"
Text="<%# MyValue %>"
BackColor = "green"
ForeColor = "white"
ToolTip = "A green and white button"
BorderStyle = "Outset"
Font-Name = "Arial Black"
Font-Size = "12pt"
Font-Bold = "False"
/>
</form>
<!--------------------------------------------------------------------------->
<script language="vb" runat="server">
ReadOnly Property MyValue() As String
'declare a read-only property for the Page
Get
Return "My Property Value"
End Get
End Property
Sub Page_Load()
'bind all the controls on the page
Page.DataBind()
End Sub
</script>
<!--------------------------------------------------------------------------->
<!-- #include file="..\global\foot.inc" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -