zoukankan      html  css  js  c++  java
  • 小程序样式的属性

    • 尺寸:width、height、min-height等
    • 边框:border
    • 边距:margin、padding
    • 背景:background
    • 文本:color、font-*
    • 其他:表格、列表等

    基本选择器:和css差不多算了不记了,其他的选择器也不说了。只记录伪类选择器。

    伪类选择器:

    • 动态伪类选择器:(:link, :visited, :hover, :active, :focus):link, 链接样式   :visited,访问后     :hover,鼠标移动     这三个因为小程序里没有鼠标,所以不起作用。:active 点击会触发样式
      <view class='it'>
       点我
      </view>
      
      
      .it:active{
        100rpx;
        height: 100rpx;
       background-color: green;
      }
      
      
      点击多久样式维持多久

      :focus  获取焦点

    • 状态伪类选择器:(:enabled, :disabled, :checked)
    • 选择伪类选择器:(:first-child, :last-child, :nth-child(), :nth-last-child(),  :nth-of-type(), nth-last-of-type(), :first-of-type, :last-of-type, :only-child, :only-of-type)
    • 空内容伪类选择器:(:empty)
    • 否定伪类选择器:(:not)
    • 伪元素:(::first-line, ::first-letter, ::before, ::after, ::selection)
  • 相关阅读:
    CAN器件
    团队赋能
    电子模拟开关
    名言出处
    危机管理
    隔离技术
    让CSS布局更加直观:box-sizing
    浅谈跨域以WebService对跨域的支持
    给初学者的20个CSS实用建议
    JS中eval处理JSON数据 为什么要加括号
  • 原文地址:https://www.cnblogs.com/bneglect/p/11052852.html
Copyright © 2011-2022 走看看