正常访问状态!
设为首页
|
加入收藏夹
|
浏览历史
http://www.guosp.com
碧海澜涛居
海纳百川,有容乃大。壁立千刃,无欲则刚!
关键词:
全部栏目
技术资料
美文日志
影视收藏
读书收藏
软件收藏
网站首页
|
关于本站
|
技术资料
|
美文日志
|
读书收藏
|
影视收藏
|
软件收藏
|
摄影相册
|
留言板
技术资料 >> 网络在线工具
搜索标签:
在线工具
编辑器
div工具
在线DIV+CSS编辑器<一>
[阅读次数:1323次] [发布时间:2010年8月28日]
此版的相对于CSS样式在线编辑器
http://www.codepub.com/software/view-software-7624.html
有比较大的改进,更直观,更方便,更实用
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>DIV+CSS编辑器</title> <META http-equiv=Content-Type content="text/html; charset=gb2312"> <meta content="all" name="robots" /> <meta name="author" content="Sunny V" /> <meta name="Contact" content="tool.la@gmail.com" /> <meta name="Copyright" content="www.Tool.La" /> <meta name="description" content="DIV+CSS编辑器是一个在线编辑DIV+CSS的在线编辑工具" /> <meta content="DIV+CSS编辑器,在线编辑,DIV+CSS,DIV+CSS工具,TOOL,TOOL.LA,工具,在线工具" name="keywords" /> <link rel="icon" href="http://www.tool.la/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="http://www.tool.la/favicon.ico" type="image/x-icon" /> <style type="text/css" media="screen"> <!-- html,body{height:100%;}*{font-size:12px;}.vcsseffect{background-color:#fff;background-image:url(grid.gif);}.hiddenObj{display:none;}.normal_input{border:1px solid #84a1bd;background-color:#fff;height:18px;}.hover_input {border:1px solid #9ecc00;background-color:#fff;height:18px;}.vcssDetail{padding: 15px;padding-top:0px;}.MainDialogCSS{ width:550px; margin-right: auto; margin-left: auto; }.DetailCSSboxModel{ height:100%; margin-right: auto; margin-left: auto; }.MainBody{ height:400px; width: 760px; margin-left: auto; margin-right: auto; } --> </style> <script language="javascript" type="text/javascript"> <!-- function hoverInput(obj,n) { if(n==1){if(obj.tagName=="INPUT" && obj.type=="text"){obj.className='hover_input';}} else{ if(obj.tagName=="INPUT" && obj.type=="text") { obj.className='normal_input'; if(obj.value!='' && !isNaN(obj.value.substring(obj.value.length-1)))obj.value+='px'; } } setSelectionWithCss(2); } var allCSSsetterCode = ""; function setSelectionWithCss(funnum) { isSetting(vcssWidth,"width"); isSetting(vcssHeight,"height"); isSetting(vcssBackgroundColor,"background-color"); isSetting(vcssColor,"color"); isSetting(vcssBorderWidth,"border-width"); isSetting(vcssBorderColor,"border-color"); isSetting(vcssBorderdStyle,"border-style"); isSetting(vcssMargin,"margin"); isSetting(vcssPadding,"padding"); isSetting(vcssFloatResult,"float"); isSetting(vcssDisplay,"display"); isSetting(vcssVisibilityResult,"visibility"); isSetting(vcssTextAlign,"text-align"); isSetting(vcssLineHeight,"line-height"); isSetting(vcssTextIndent,"text-indent"); isSetting(vcssFontSize,"font-Size"); isSetting(vcssFontFamily,"font-family"); isSetting(vcssFontWeight,"font-weight"); isSetting(vcssDecorationResult,"text-decoration"); isSetting(vcssPosition,"position"); isSetting(vcssZIndex,"z-index"); isSetting(vcssLeft,"left"); isSetting(vcssRight,"right"); isSetting(vcssTop,"top"); isSetting(vcssBottom,"bottom"); isSetting(vcssPositionResult,"list-style-position"); isSetting(vcssCursor,"cursor"); isSetting(vcssBackgroundRepeat,"background-repeat"); isSetting(vcssBackgroundAttachment,"background-attachment"); isSetting(vcssListStyleType,"list-style-type"); isSetting(vcssOverflow,"overflow"); isSetting(vcssClear,"clear"); isSetting(vcssVerticalAlign,"vertical-align"); if(vcssBackgroundImage.value!="")allCSSsetterCode+="background-image:url("+vcssBackgroundImage.value+");"; if(vcssBackgroundPositionX.value!="" && vcssBackgroundPositionY.value!="")allCSSsetterCode+="background-position:"+vcssBackgroundPositionX.value+" "+vcssBackgroundPositionY.value+";"; if(vcssListStyleImage.value!="")allCSSsetterCode+="list-style-image:url("+vcssListStyleImage.value+");"; if(funnum==1) { alert(allCSSsetterCode); } else { var everyRule = allCSSsetterCode.split(';'); var resultCSSTEXT=vcssIdentName.value+"\r\n{\t"; for(var v=0;v<everyRule.length-1;v++) { resultCSSTEXT+=everyRule[v]+";\r\n\t"; } resultCSSTEXT+="\r\n}"; document.all.cssTextValue.value=String(resultCSSTEXT); document.all.cssTextValueCompare.value=String(allCSSsetterCode); vcsseffect_div.style.cssText=String(allCSSsetterCode); } allCSSsetterCode=""; } var isFisrtGetCss = true; function getSelectionWithCss(funnum) { isGetting("vcssWidth","width"); isGetting("vcssHeight","height"); isGetting("vcssBackgroundColor","backgroundColor"); isGetting("vcssColor","color"); isGetting("vcssBorderWidth","borderWidth"); isGetting("vcssBorderColor","borderColor"); isGetting("vcssBorderdStyle","borderStyle"); isGetting("vcssMargin","margin"); isGetting("vcssPadding","padding"); isGetting("vcssFloat","float"); isGetting("vcssDisplay","display"); isGetting("vcssVisibilityResult","visibility"); isGetting("vcssTextAlign","textAlign"); isGetting("vcssLineHeight","lineHeight"); isGetting("vcssTextIndent","textIndent"); isGetting("vcssFontSize","fontSize"); isGetting("vcssFontFamily","fontFamily"); isGetting("vcssFontWeight","fontWeight"); isGetting("vcssDecorationResult","textDecoration"); isGetting("vcssBackgroundImage","backgroundImage"); isGetting("vcssBackgroundRepeat","backgroundRepeat"); isGetting("vcssBackgroundAttachment","backgroundAttachment"); isGetting("vcssListStyleType","listStyleType"); isGetting("vcssListStyleImage","ListStyleImage"); isGetting("vcssPositionResult","listStylePosition"); isGetting("vcssCursor","cursor"); } function isSetting(cssobj,cssStartParam) { if(cssobj.value!="")allCSSsetterCode+=cssStartParam+":"+cssobj.value+";"; } function isGetting(cssobj,cssStartParam) { if(isFisrtGetCss) { ele = document.getElementById("vv"); if(eval("ele.style."+cssStartParam)!="") { document.all[cssobj].value=eval("ele.style."+cssStartParam); } } } //--> </script> <script> var sInitColor = null; function callColorDlg(obj){ if (sInitColor == null) var sColor = dlgHelper.ChooseColorDlg(); else var sColor = dlgHelper.ChooseColorDlg(sInitColor); sColor = sColor.toString(16); if (sColor.length < 6) { var sTempString = "000000".substring(0,6-sColor.length); sColor = sTempString.concat(sColor); } if(sColor!="000000"){ sColor = "#" + sColor; obj.value=sColor; obj.style.backgroundColor=sColor; }} </script></head><OBJECT id=dlgHelper CLASSID="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" width="0px" height="0px"></OBJECT> <body> <p align="center"> <font style="color:#FF0000; font-size:14px; font-weight:bolder"> 在线DIV+CSS编辑器 </font> </p> <div class="MainBody" id="MainBody"> <div onMouseOver="hoverInput(event.srcElement,1);" onMouseOut="hoverInput(event.srcElement,2);" onKeyUp="setSelectionWithCss(2);" class="MainDialogCSS"> <div id="vcssDetail_div" class="vcssDetail" style="display:block;"><p> 类/标签/ID:<input name="vcssIdentName" id="vcssIdentName" value=".style1" class="normal_input" onmouseover="select();" onMouseOut="event.cancelBubble=true;this.className='normal_input';" /> 所有数值都不用输入单位;<br /> 宽:<input name="vcssWidth" type="text" class="normal_input" id="vcssWidth" value="" size="8" /> 高:<input name="vcssHeight" type="text" class="normal_input" id="vcssHeight" value="" size="8" /> 背景色:<input name="vcssBackgroundColor" type="text" class="normal_input" id="vcssBackgroundColor" onMouseOut="event.cancelBubble=true;this.className='normal_input';" value="" size="8" onClick="callColorDlg(this)" /> 前景色:<input name="vcssColor" type="text" class="normal_input" id="vcssColor" value="" size="8" onMouseOut="event.cancelBubble=true;this.className='normal_input';" onClick="callColorDlg(this)" /><br> 边框:<input name="vcssBorderWidth" onclick="value=1;vcssBorderdStyle.value='solid';" type="text" class="normal_input" id="vcssBorderWidth" value="" size="8" /> 颜色:<input name="vcssBorderColor" type="text" class="normal_input" id="vcssBorderColor" value="" size="8" onClick="callColorDlg(this)" onMouseOut="event.cancelBubble=true;this.className='normal_input';" /> <select name="vcssBorderdStyle" id="vcssBorderdStyle" onclick="if(value=='')value='solid';"> <option selected>选择<option value="solid">solid<option value="dotted">dotted<option value="none">none<option value="hidden">hidden<option value="dashed">dashed<option value="double">double<option value="groove">groove<option value="ridge">ridge<option value="inset">inset<option value="outset">outset</select><br> 外间距 Margin :<input name="vcssMargin" type="text" onKeyDown="if(event.keyCode==32)this.value+='px';" class="normal_input" id="vcssMargin" value="" size="20" /> 如:10px 2px <br> 内间距 Padding:<input name="vcssPadding" type="text" onKeyDown="if(event.keyCode==32)this.value+='px';" onBlur="if(this.value!='' && !isNaN(this.value.substring(this.value.length-1)))this.value+='px';" class="normal_input" id="vcssPadding" value="" size="20" /> 如:10px 2px<br> 浮动: 左<input type="radio" name="vcssFloat" onClick="if(this.checked)vcssFloatResult.value=this.value" value="left"> 右<input name="vcssFloat" type="radio" onClick="if(this.checked)vcssFloatResult.value=this.value" value="right"><input name="vcssFloat" type="radio" class="hiddenObj" id="unsetFloat" onClick="if(this.checked)vcssFloatResult.value='';" /> <a onClick="unsetFloat.click();" style="cursor:pointer;" title="取消浮动属性">×</a> <input name="vcssFloatResult" type="hidden" /> 显示:<select name="vcssDisplay" id="vcssDisplay"> <option selected>选择 <option value="block">block <option value="inline">inline <option value="none">none </select> 可见:<input type="radio" name="vcssVisibility" value="visible" onClick="if(this.checked)vcssVisibilityResult.value=this.value">可见 <input type="radio" name="vcssVisibility" value="hidden" onClick="if(this.checked)vcssVisibilityResult.value=this.value">隐藏 <input type="radio" name="vcssVisibility" class="hiddenObj" id="unsetVisibility" onClick="if(this.checked)vcssVisibilityResult.value='';" /><a onClick="unsetVisibility.click();" style="cursor:pointer;" title="取消可见属性">×</a> <input name="vcssVisibilityResult" type="hidden" /> <br> 文本对齐:<select name="vcssTextAlign" id="vcssTextAlign" onclick="if(value=='')value='center';"> <option selected>选择</option> <option value="left">left</option> <option value="center">center</option> <option value="right">right</option> </select> 行高:<input name="vcssLineHeight" type="text" class="normal_input" id="vcssLineHeight" onMouseOut="event.cancelBubble=true;this.className='normal_input';" value="" size="8" /> <select name="vcssLineUnit" id="select5"> <option value="%">%</option> <option selected>无</option> <option value="px">px</option> </select> 文字缩进:<input name="vcssTextIndent" type="text" class="normal_input" id="vcssLineHeight4" value="" size="8" /> <br> 文本:<input name="vcssFontSize" type="text" class="normal_input" id="vcssFontSize" value="12px" size="5" /> 字体: <select name="vcssFontFamily" id="vcssFontFamily" onclick="if(value=='')value='Arial';"><option selected>选择</option><option value="宋体">宋体<option value="黑体">黑体<option value="Arial">Arial<option value="微软雅黑">雅黑</select> 粗细:<input name="vcssFontWeight" type="text" class="normal_input" id="vcssLineHeight3" value="" size="8" onMouseOut="event.cancelBubble=true;this.className='normal_input';" /> 效果:<input type="radio" name="vcssTextDecoration" value="underline" onClick="if(this.checked)vcssDecorationResult.value=this.value">下划线 <input type="radio" name="vcssTextDecoration" value="none" onClick="if(this.checked)vcssDecorationResult.value=this.value">无 <input type="radio" name="vcssVisibility" class="hiddenObj" id="unsetDecoration" onClick="if(this.checked)vcssDecorationResult.value='';" /><a onClick="unsetDecoration.click();" style="cursor:pointer;" title="取消文字效果属性">×</a> <input name="vcssDecorationResult" type="hidden" /> <br> 背景图片:<input name="vcssBackgroundImage" type="file" class="normal_input" id="vcssBackgroundImage"> 重复:<select name="vcssBackgroundRepeat" id="vcssBackgroundRepeat" onclick="if(value=='')value='no-repeat';"><option selected>选择<option value="repeat-x">横向重复<option value="repeat-y">纵向重复<option value="no-repeat">不重复</select> <br> 水平位置:<input name="vcssBackgroundPositionX" type="text" class="normal_input" id="vcssBackgroundPositionX" value="" size="5" /> 垂直位置:<input name="vcssBackgroundPositionY" type="text" class="normal_input" id="vcssBackgroundPositionY" value="" size="5" /> 附件:<select name="vcssBackgroundAttachment" id="vcssBackgroundAttachment" onclick="if(value=='')value='fixed';"><option selected>选择<option value="fixed">固定<option value="scroll">滚动</select> <br /> 垂直对齐:<select name="vcssVerticalAlign" id="vcssVerticalAlign" onclick="if(value=='')value='middle';"> <option selected>选择</option> <option value="middle">middle</option> <option value="bottom">bottom</option> <option value="auto">top</option> <option value="auto">auto</option> <option value="baseline">baseline</option> </select> 清除:<select name="vcssClear" id="vcssClear" onclick="if(value=='')value='both';"> <option selected>选择</option> <option value="left">left</option> <option value="right">right</option> <option value="both">both</option> </select> Overflow:<select name="vcssOverflow" id="vcssOverflow" onclick="if(value=='')value='hidden';"> <option selected>选择</option> <option value="scroll">scroll</option> <option value="auto">auto</option> <option value="hidden">hidden</option> </select> <br /> 定位:<select name="vcssPosition" id="vcssPosition"> <option selected>选择</option> <option value="absolute">绝对</option> <option value="relative">相对</option> </select> Z坐标:<input name="vcssZIndex" id="vcssZIndex" class="normal_input" size="5" value="" onMouseOut="event.cancelBubble=true;this.className='normal_input';" /> left:<input name="vcssLeft" id="vcssLeft" class="normal_input" size="4" value="" /> top:<input name="vcssTop" id="vcssTop" class="normal_input" size="4" /> right:<input name="vcssRight" id="vcssRight" class="normal_input" size="4" /> bottom:<input name="vcssBottom" id="vcssBottom" class="normal_input" size="4" /> <br /> UL列表:类型<select name="vcssListStyleType" id="vcssListStyleType" onclick="if(value=='')value='none';"> <option selected>选择</option> <option value="none">none</option> <option value="disc">disc</option> <option value="circle">circle</option> <option value="square">square</option> <option value="decimal">decimal</option> </select> 图像:<input name="vcssListStyleImageBtn" type="button" id="vcssListStyleImageBtn" onclick="vcssListStyleImage.click();" value="..."> <input name="vcssListStyleImage" id="vcssListStyleImage" type="file" value="" style="display:none;" /> 位置:<input type="radio" name="vcssListStylePosition" value="inside" onClick="if(this.checked)vcssPositionResult.value=this.value">内 <input type="radio" name="vcssListStylePosition" value="outside" onClick="if(this.checked)vcssPositionResult.value=this.value">外 <input type="radio" name="vcssVisibility" class="hiddenObj" id="unsetPosition" onClick="if(this.checked)vcssPositionResult.value='';" /><a onClick="unsetPosition.click();" style="cursor:pointer;" title="取消列表效果属性">×</a> <input name="vcssPositionResult" type="hidden" /> 光标: <select name="vcssCursor" id="vcssCursor" onclick="if(value=='')value='pointer';"> <option selected>选择</option> <option value="default">默认</option> <option value="pointer">手</option> <option value="text">文本</option> <option value="move">移动</option> <option value="crosshair">crosshair</option> <option value="default">default</option> <option value="pointer">pointer</option> <option value="hand">hand</option> <option value="move">move</option> <option value="help">help</option> <option value="wait">wait</option> <option value="text">text</option> <option value="w-resize">w-resize</option> <option value="s-resize">s-resize</option> <option value="n-resize">n-resize</option> <option value="e-resize">e-resize</option> </select><br /><br /> <input name="vcssOk" type="button" id="vcssOk" onClick="setSelectionWithCss(1);" value="确定"> <input name="vcssCancel" type="button" id="vcssCancel" value="取消"> <input name="vcssView" type="button" id="vcssView" onClick="setSelectionWithCss(2);" value="应用"> <input name="vcssImport" type="button" id="vcssImport" value="@import.."> <input name="vcssSave" type="button" id="vcssSave" value="保存.."> <input name="vcssLoad" type="button" id="vcssLoad" value="载入.."> <br><fieldset style="padding:10px; "><legend>实际应用效果如下</legend><div id="vcsseffect_div" class="vcsseffect"> Effect of This Rule Shows You at here! <br>工具啦 (www.tool.la) 给你最全、最好的工具!</div> </fieldset><br></p></div></div> <hr /> <textarea name="cssTextValue" cols="100" rows="5" id="cssTextValue"></textarea> <input name="vcssView" type="button" id="vcssView" onclick="window.clipboardData.setData('text',document.all.cssTextValue.value);alert('CSS已保存到剪贴板');" value="复制到剪切板"> <textarea name="cssTextValueCompare" cols="100" rows="5" id="cssTextValueCompare"></textarea> <input name="vcssView2" type="button" id="vcssView" onclick="window.clipboardData.setData('text',document.all.cssTextValueCompare.value);alert('CSS已保存到剪贴板');" value="复制到剪切板"> <hr /> <div class="vv" id="vv" contentEditable="true" style="width:300px;height:50px;background-color:#ff80c0;color:#800040;border-width:1px;border-color:#ff0080;border-style:solid;margin:6px;padding:6px;float:left;font-Size:12px;"> 这是一个使用了复杂的样式的DIV,你可以使用获取CSS来获取这个CSS </div><input type="button" id="vcssView" onclick="getSelectionWithCss();setSelectionWithCss()" value="获取左侧DIV样式"> <div style="width:100% "> </div> </div> </body> </html>
注:可手动修改代码后运行!
本页地址:
[复制地址]
该页内容非本站原创 收藏自:http://www.codepub.com/d/downpage.php?n=1&id=9089::1173059053
返回顶部
评论统计(0条)
|
我要评论
暂无评论内容!
我要评论
我要评论:
带*部分需要填写
姓名称呼:
* 请填写您的姓名或呢称
联系方式:
QQ,MSN,Email都可以,方便交流 (仅管理员可见)
评论内容:
* 不超过100字符,50汉字
验证码:
推荐链接
最近更新
·
Host 'XXX' is not allowed...
·
Win2008或IIS7的文件上传大...
·
IIS7.0上传文件限制的解决方...
·
测试信息2015-03-11
·
asp.net中处理图片
·
ASP.NET之Web打印-终极解决...
·
Asp.net下C#调用Word模版实...
·
asp.net下将页面内容导入到...
·
asp.net导出为pdf文件
·
asp.net生成pdf文件
·
FCKeditor 文本编辑器的使用...
·
ASP.NET 将数据生成PDF
·
asp.net2.0导出pdf文件完美...
·
AspJpeg的安装与测试
·
JS验证浏览器版本对IE11的支...
热门浏览
·
IE8和IE9出现“此网页上的问...
·
无线路由器密码破解,教你断...
·
js替换所有回车换行符
·
QQ/MSN在线交流代码
·
如何取消键盘上的一些快捷键...
·
IE弹出“中国工商银行防钓鱼...
·
win7声音小的解决方法
·
webdav漏洞的利用
·
强制两端对齐的函数或者CSS...
·
win7下成功安装sql server ...
·
显示器分辨率调的过高导致电...
·
天诺时空技术技术论坛
·
js验证手机号码格式
·
JS展开和收缩效果(二)
·
本地计算机上的 MSSQLSERVE...
碧海澜涛居
网站首页
|
关于本站
|
站长简介
|
开发案例
|
技术资料
|
美文日志
|
摄影相册
|
读书收藏
|
影视收藏
|
留言板
版权所有:碧海澜涛 QQ:410436434 Email:
shaopo_guo@163.com
苏ICP备15000526号
免责声明:本站为个人网站,站内所有文字、图片等各类资料均为个人兴趣爱好所收集,不用作任何商业用途,亦不保证资料的真实性,若有因浏览本站内容而导致的各类纠纷,本站也不承担任何责任。本站部分内容来自互联网,如有涉及到您的权益或隐私请联系站长解决。