• 如何应用JS来改变CSS样式


    若是一个页面要同时显示简体字,繁体字,那么gbk编码就足够了。但若是还要显示日文,韩文等,那就非utf-8不成了。在unicode里,u0800-u9FFF为中、韩、日字符。此中,中文的局限:u4e00-u9fa5,日文在u0800-u4e00,韩文为u9fa5以上。
    ??? 但其实,用utf-8的话还是会有一个题目标。有一些汉字,在日文里也有应用,但写法和我们凡是的写法有略有不合,也还可以辩认。如下图,第一行是汉字凡是的写法,第二行是日文里的,写法上也略有变革。日文里该当就是直接用了中文,但因为汗青上汉字就有很多异形字,两国各自标准化时采取的写法不一样。如许该当编成两个字符还是一个字符,确切也不好断定。今朝,在unicode里,它们是编成一个字符。如今看起来不合是因为它们的字体不一样(第一行是宋体,第二行是MS Mincho),就是说,在一篇中文和日文混排的文章里,要想让分清楚这两种,用一种字体是不成能的。也就是说,要分隔中文和日文,仅看unicode编码是不敷的,还要搜检字体。

    如何应用JS来改变CSS样式

    办法:?

    document.getElementById("xx").style.xxx中的所有属性是什么

    盒子标签和属性对比色彩和靠山标签和属性对比样式标签和属性对比文字样式标签和属性对比文本标签和属性对比
    CSS语法(不区分大小写) JavaScript语法(区分大小写)
    border border
    border-bottom borderBottom
    border-bottom-color borderBottomColor
    border-bottom-style borderBottomStyle
    border-bottom-width borderBottomWidth
    border-color borderColor
    border-left borderLeft
    border-left-color borderLeftColor
    border-left-style borderLeftStyle
    border-left-width borderLeftWidth
    border-right borderRight
    border-right-color borderRightColor
    border-right-style borderRightStyle
    border-right-width borderRightWidth
    border-style borderStyle
    border-top borderTop
    border-top-color borderTopColor
    border-top-style borderTopStyle
    border-top-width borderTopWidth
    border-width borderWidth
    clear clear
    float floatStyle
    margin margin
    margin-bottom marginBottom
    margin-left marginLeft
    margin-right marginRight
    margin-top marginTop
    padding padding
    padding-bottom paddingBottom
    padding-left paddingLeft
    padding-right paddingRight
    padding-top paddingTop
    CSS 语法(不区分大小写) JavaScript 语法(区分大小写)
    background background
    background-attachment backgroundAttachment
    background-color backgroundColor
    background-image backgroundImage
    background-position backgroundPosition
    background-repeat backgroundRepeat
    color color
    ?
    CSS语法(不区分大小写) JavaScript 语法(区分大小写)
    display display
    list-style-type listStyleType
    list-style-image listStyleImage
    list-style-position listStylePosition
    list-style listStyle
    white-space whiteSpace
    ?
    CSS 语法(不区分大小写) JavaScript 语法(区分大小写)
    font font
    font-family fontFamily
    font-size fontSize
    font-style fontStyle
    font-variant fontVariant
    font-weight fontWeight
    ?
    CSS 语法(不区分大小写) JavaScript 语法(区分大小写)
    letter-spacing letterSpacing
    line-break lineBreak
    line-height lineHeight
    text-align textAlign
    text-decoration textDecoration
    text-indent textIndent
    text-justify textJustify
    text-transform textTransform
    vertical-align

    verticalAlign

  • 相关阅读:
    LINUX查看进程开始时间、结束时间、运行时间
    excel字符处理函数
    oracle RMAN参数配置详解
    Linux添加双IP
    免费软电话 — XLite 的安装及配置向导
    Asterisk实现寻呼对讲广播的Page()命令详解
    自动化工具的重要性
    负载均衡之应用请求路由模块的使用(ARR)(七)[使用ARR来实现主机名共享]
    负载均衡之应用请求路由模块的使用(ARR)(二)[安装]
    需求管理随笔
  • 原文地址:https://www.cnblogs.com/luojianqun/p/2819435.html
Copyright © 2020-2023  润新知