net 后台设置div的css属性,设置style
前台div
Html代码
<div id="DIV1" runat="server" >
</div>
后台:
C#代码
this.DIV1.Style.Value = "display:none";
或者:
C#代码
DIV1.Attributes.CssStyle.Value = "display:none";
相关文档:
图片自动适应大小的问题在平时制作的时候是比较常见的问题,下面提供一个比较简单的解决方法:
div img {
max-width:600px;
//IE7、FF等其他非IE浏览器下最大宽度为600px;
width:600px;
//所有浏览器中图片的大小为600px;
width:expression(document.body.clientWidth>600?"600px":"auto");
//当图片大小大于6 ......
<style type="text/css">
<!--
input{ background:expression((this.readOnly &&this.readOnly==true)?"#CCCCCC":"")}
-->
</style>
<body>
<input type="text" name="" />
<input type="text" name="" readonly="readonly" />
expression:处理方式:
  ......
绝对定位的元素的位置相对于最近的已定位祖先元素,如果元素没有已定位的祖先元素,那么它的位置相对于最初的包含块。
对于定位的主要问题是要记住每种定位的意义。所以,现在让我们复习一下学过的知识吧:相对定位是“相对于”元素在文档中的初始位置,而绝对定位是“相对于”最近的已定位祖先元素, ......
要做个BS的网站项目,恶补一下CSS。
CSS常用属性:
字体属性
:(font)
大小 font-size: x-large;(特大) xx-small;(极小) 一般中文用不到,只要用数值就可以,单位:PX、PD
样式 font-style: oblique;(偏斜体) italic;(斜体) normal;(正常)
行高 line-height: normal;(正常) 单位:PX、PD、EM
粗细 font-weight: bold ......
/***************************by
garcon1986********************************/
区分
visibility:hidden
和
display:none
visibility:hidden
hides an element, but it will still take up the same space as before.
The element will be hidden, but still affect the layout.
Display: none
hides ......