//单独创建一个JS 文件,写上如下代码document.documentElement.style.fontSize = document.documentElement.clientWidth/19.2 + "px"; window.addEventListener("resize",setRe... ...
分类:
其他好文 时间:
2017-11-13 13:36:50
阅读次数:
171
<!DOCTYPE html><html><head> <script type="text/javascript"> document.documentElement.style.fontSize=document.documentElement.clientWidth/6.4+'px'; doc ...
分类:
移动开发 时间:
2017-11-02 13:03:41
阅读次数:
228
<script>
$(function(){
//本来是这样的:UE.getEditor(‘editor‘);传入参数后就是下面那样子了,toolbars里的就是工具的图标
UE.getEditor(‘editor‘,{
toolbar:[
[‘fullscreen‘,‘source‘,‘undo‘,‘redo‘,‘bold‘,‘italic‘,
‘underline‘,‘fontborder‘,‘backcolor‘,‘fontsize‘..
分类:
其他好文 时间:
2017-10-18 19:59:05
阅读次数:
210
1、document.documentElement 返回根节点 html。 2、原生方法获取一个对象的某个样式的值。 alert(getStyle(document.documentElement,'fontSize')) ; ...
分类:
Web程序 时间:
2017-10-18 10:07:42
阅读次数:
168
注:因为所有的浏览器默认字体大小都是16px,所以我们也可以设置html的fontsize为62.5% (10/16*100%); ...
分类:
其他好文 时间:
2017-10-12 15:41:31
阅读次数:
156
新手看到这几个属性,很头疼,参考了网上一些文章,加上自己实践,给出对这几个属性的解释 我把代码贴上来,方便大家验证 在chrome浏览器中,不知为什么图片容器高度比图片高度多了4px,把图片设置为block或者是容器的fontSize设置为0可解决这个问题。 图片是这个 页面效果,我放了两张图片,下 ...
分类:
其他好文 时间:
2017-10-08 16:12:07
阅读次数:
182
1、js中注意问题 font-size 改成fontSize padding-top 改成paddingTop js中不认识-,所以要以小驼峰方式操作属性或者以[” ”]方式,例[”font-size ”] 2、js动态添加Class class 改成className 3、oInp.type = ...
分类:
Web程序 时间:
2017-09-22 21:07:28
阅读次数:
167
/** 获取字符串 只定宽度内 所需的高度 circleOfFriendsModel.content:字符串内容 DEF_FontSize_12:字体大小 309:只定空间的大小 这里指容放字符串的 宽度 */ CGSize strSize = [circleOfFriendsModel.conte... ...
分类:
其他好文 时间:
2017-09-18 14:55:30
阅读次数:
203
css规则:选择器,以及一条或者多条生命。 selector{declaration1;,,,;desclarationN} 每条声明是由一个属性和一个值组成 property:value 例子: h1{color:red;fontsize:14px} 元素选择器:直接选择文档元素 id选择器 属性 ...
分类:
其他好文 时间:
2017-09-11 10:26:43
阅读次数:
198
Vue.js style(内联样式) 我们可以在 v-bind:style 直接设置样式: <div id="app"> <div v-bind:style="{ color: activeColor, fontSize: fontSize + 'px' }">Hello word!</div> < ...
分类:
Web程序 时间:
2017-08-30 20:02:54
阅读次数:
263