社区
ASP
帖子详情
如何动态设置style?
chengfeng
2006-10-03 11:14:52
我建立了一个层
<DIV id="id1" style="BORDER-RIGHT: ........."></DIV>
我希望在程序中动态修改style这个object怎么修改?
由于style中是变量参数,所以直接设置style.top=100这种方法貌似不行
...全文
441
9
打赏
收藏
如何动态设置style?
我建立了一个层 我希望在程序中动态修改style这个object怎么修改? 由于style中是变量参数,所以直接设置style.top=100这种方法貌似不行
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
9 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
chengfeng
2006-10-08
打赏
举报
回复
up
stou
2006-10-07
打赏
举报
回复
up
飘零雾雨
2006-10-07
打赏
举报
回复
先顶再看!
chengfeng
2006-10-07
打赏
举报
回复
谁能解决这个问题,两百分都给他
http://community.csdn.net/Expert/topic/5062/5062214.xml?temp=.3831751
chengfeng
2006-10-07
打赏
举报
回复
有个关键问题求解
地址:
http://community.csdn.net/Expert/topic/5062/5062214.xml?temp=.3831751
btbtd
2006-10-04
打赏
举报
回复
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- DW6 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<script type="text/javascript">
//<![CDATA[
function cColor(color_){
test.style.color=color_;
}
//]]>
</script>
</head>
<body>
<form name="form1" method="post" action="">
<select name="select" onChange="cColor(this.value)">
<option value="black">black</option>
<option value="blue">blue</option>
<option value="red">red</option>
</select>
</form>
<xmp id="test">
background
[background-color ||background-image ||background-repeat || background-attachment ||background-position]
background-attachment
scroll | fixed
background-color
color | transparent
background-image
url( url ) | none
background-position
[ [percentage | length ]{1,2} | [ [top | center | bottom] || [left | center | right] ] ]
background-repeat
repeat | repeat-x | repeat-y | no-repeat
border
[ border-width ||border-style || color ]
border-collapse
collapse | separate
border-color
color{1,4} | transparent
border-spacing
length length?
border-style
[none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset]{1,4}
border-top border-right border-bottom border-left
[ border-top-width ||border-top-style || color ]
border-top-color border-right-color border-bottom-color border-left-color
color
border-top-style border-right-style border-bottom-style border-left-style
none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset
border-top-width border-right-width border-bottom-width border-left-width
thin | medium | thick | length
border-width
[thin | medium | thick | length]{1,4}
bottom
length | percentage | auto
caption-side
top | bottom | left | right
clear
none | left | right | both
clip
[rect( [length | auto]{4} )] | auto
color
color
content
[ string | url( url ) | counter | attr(attribute-name) | open-quote | close-quote | no-open-quote | no-close-quote ]+
counter-increment
[ identifier integer? ]+ | none
counter-reset
[ identifier integer? ]+ | none
cursor
[ [url( url ) ,]* [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | text | wait | help ] ]
direction
ltr | rtl
display
inline | block | list-item | run-in | compact | marker | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | none
empty-cells
show | hide
float
left | right | none
font
[ [ font-style || font-variant || font-weight ]? font-size [ / line-height ]? font-family ] | caption | icon | menu | message-box | small-caption | status-bar
font-family
[[ family-name | serif | sans-serif | monospace | cursive | fantasy],]+
font-size
xx-small | x-small | small | medium | large | x-large | xx-large | smaller | larger | length | percentage
font-size-adjust
number | none
font-stretch
normal | wider | narrower | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded
font-style
normal | italic | oblique
font-variant
normal | small-caps
font-weight
normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
height
length | percentage | auto
left
length | percentage | auto
letter-spacing
normal | length
line-height
normal | number | length | percentage
list-style
[ list-style-type || list-style-position || list-style-image ]
list-style-image
url( url ) | none
list-style-position
inside | outside
list-style-type
disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-alpha | lower-latin | upper-alpha | upper-latin | hebrew | armenian | georgian | cjk-ideographic | hiragana | katakana | hiragana-iroha | katakana-iroha | none
margin
[length | percentage | auto]{1,4}
margin-topmargin-right margin-bottom margin-left
length | percentage | auto
marker-offset
length | auto
marks
[ crop || cross ] | none
max-height
length | percentage | none
max-width
length | percentage | none
min-height
length | percentage
min-width
length | percentage
orphans
integer
outline
[ outline-color || outline-style || outline-width ]
outline-color
color | invert
outline-style
none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset
outline-width
thin | medium | thick | length
overflow
visible | hidden | scroll | auto
padding
[length | percentage]{1,4}
padding-top padding-right padding-bottom padding-left
length | percentage
page
identifier | auto
page-break-after
auto | always | avoid | left | right
page-break-before
auto | always | avoid | left | right
page-break-inside
avoid | auto
position
static | relative | absolute | fixed
quotes
[string string]+ | none
right
length | percentage | auto
size
length{1,2} | auto | portrait | landscape
table-layout
auto | fixed
text-align
left | right | center | justify | string
text-decoration
none | [ underline || overline || line-through || blink ]
text-indent
length | percentage
text-shadow
none | [color || length length length? ,]* [color || length length length?]
text-transform
capitalize | uppercase | lowercase | none
top
length | percentage | auto
unicode-bidi
normal | embed | bidi-override
vertical-align
baseline | sub | super | top | text-top | middle | bottom | text-bottom | percentage | length
visibility
visible | hidden | collapse
white-space
normal | pre | nowrap
widows
integer
width
length | percentage | auto
word-spacing
normal | length
z-index
auto | integer
</xmp>
</body>
</html>
xulxqqqq
2006-10-03
打赏
举报
回复
如果是直接添加在实践中的代码使用this.style.top....
engzs
2006-10-03
打赏
举报
回复
document.getElementById("id1").style.top=变量名+"px";
笨笨兔兔兔兔兔
2006-10-03
打赏
举报
回复
好几种方法,不过要看你是怎么动态的,根据情况做个选择
Qt5 Qml Virtual Keyboard
Style
Qml Virtual Keyboard
Style
课程主要讲解HMI中控触摸屏虚拟键盘样式的个性化定制。在原API基础上根据IOS14 Light and Dark风格规范定制两款键盘样式
如何自定义一个View,并
动态
设置
style
?
定义一个TextView的
style
,常用的方法是在xml文件中实现,但有时候我们需要
动态
的在代码中自定义个
style
的View,进行
动态
的添加或删除等控制,这时候需要用到inflater方法。TextView的xml,R.layout.empty_text_view:
Vue
动态
设置
Style
、Class
vue中使用v-bind
动态
设置
style
android
动态
style
,Android控件
动态
设置
style
的问题
前面做项目因为里面的布局大多是JAVA代码里
动态
生成的,统一样式时就遇到了如何 在代码中
动态
引用
style
文件的问题,上网查了很多资料,都没得一个好点的解决方案,大多是叫一个属性一个属性的
设置
。当然这样也可以实现想要的功能, 不过达不到统一样式的目的,思来想去,最终找到一个方法 可以让代码中
动态
生成的控件照样引用XML中的
STYLE
样式。看起来有些取巧的意思,不过能达到目的,如果各位大神有其他更好...
android控件
动态
设置
style
,安卓全局
设置
自定义
Style
继承原生控件
有时候需要更改TextView的默认颜色,最近安卓10上面如果TextView自己没
设置
默认的颜色的话它是默认白色的,很容易造成看不清的问题。更改的话一个一个改太麻烦,下面直接几行代码全部搞定:在应用的values/
style
s .xml中更改定义自定义应用全部button控件的
style
:代码:@drawable/selector_button_background@drawable/selec...
ASP
28,391
社区成员
357,060
社区内容
发帖
与我相关
我的任务
ASP
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
复制链接
扫一扫
分享
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章