加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

dojo 控件样式修改

发布时间:2020-12-16 21:32:47 所属栏目:百科 来源:网络整理
导读:require(["dojo"],function(dojo){ // Passing only an ID or node returns the computed style object of the node: dojo.style("thinger"); // Passing a node and a style property returns the current normalized,computed value for that property: do


require(["dojo"],function(dojo){

// Passing only an ID or node returns the computed style object of the node:

dojo.style("thinger");


// Passing a node and a style property returns the current normalized,computed value for that property:

dojo.style("thinger","opacity"); // 1 by default


// Passing a node,a style property,and a value changes the current display of the node and returns the new computed value

dojo.style("thinger","opacity",0.5); // == 0.5


// Passing a node,an object-style style property sets each of the values in turn and returns the computed style object of the node:

dojo.style("thinger",{

"opacity": 0.5,

"border": "3px solid black",

"height": "300px"

});


// When the CSS style property is hyphenated,the JavaScript property is camelCased.

// font-size becomes fontSize,and so on.

dojo.style("thinger",{

fontSize:"14pt",

letterSpacing:"1.2em"

});


// dojo.NodeList implements .style() using the same syntax,omitting the "node" parameter,

// calling dojo.style() on every element of the list. See: dojo.query() and dojo.NodeList

dojo.query(".someClassName").style("visibility","hidden");


// or


dojo.query("#baz > div").style({

opacity:0.75,

fontSize:"13pt"

});

});

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读