您的位置:首页 > Web前端 > CSS

修改过的项目内容

2015-07-24 14:33 645 查看
加某个属性,支持该属性在后台配置下前端的显示运行:
if($(n).attr("field")&&$(n).attr("field")=="1"){
var wrapperWidth=$(n).find("div[id*=fsUploadProgress]").width();
$(n).find(".progress").each(function(){
$(this).css("width",wrapperWidth+"px");
$(this).find(".Container").css("width",wrapperWidth*0.9+"px");
var _width = $(this).find(".Container").width()-30;
$(this).find(".progressName").css({"overflow":"visible","width":_width+"px"});
$(this).find(".progressName").children("div:has('.fl')").css("width","80%");
});
}
总结:
在项目中,一般都用精确的值,百分比会有浮动的差异。

合并css样式可以用数组:.css({"":"","":""});

查找某个div下的class可以用:children("div:has('.f1')");
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  css has(" &quo