npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

simple-common-css

v1.0.0

Published

一个简单易用的 css 基础库

Downloads

2

Readme

simple-common-css

一个简单易用的 css 基础库

安装

npm install sinple-common-css

或者

pnpm add sinple-common-css 

使用

<style>
  @import "simple-common-css/layout.css"
</style>
<div class="flex-middle">
  <div
    class="fcc"
    style="width: 7.5rem; height: 1rem; background-color: aqua"
  >
    <div>width: 750px;height: 100px;</div>
  </div>
</div>

layout.css

对齐

  • text-left: 左对齐
  • text-center: 居中
  • text-right: 右对齐
  • inline-block: 行内块状元素

flex

  • flex: flex 布局

  • flex-v, flex-column: 子元素竖向排列

  • flex-center: 子元素在主轴上居中排列

  • flex-between: 子元素在主轴上平均分布,首尾两端不留空间

  • flex-around: 子元素在主轴上平均分布,每个子元素周围都留有相等的空间

  • flex-evenly: 子元素在主轴上平均分布,包括首尾两端

  • flex-start: 子元素在主轴上从起始位置开始排列

  • flex-end: 子元素在主轴上从结束位置开始排列

  • flex-middle: 子元素竖向居中排列

  • fcc: 子元素横向和竖向都居中排列

  • fcb: 子元素在竖向居中,横向平均分布,首尾两端不留空间

position

  • relative: 相对定位, 为 absolute 提供相对位置
  • position: 绝对定位
  • fixed: 相对于视口(浏览器窗口)进行定位

display

  • hide, hidden: 隐藏元素
  • mute: 文字颜色淡化

换行

  • nowrap: 禁止换行
  • wrap: 换行
  • ellipsis: 单行超出后显示...
  • two-ellipsis: 2 行超出后显示...
  • three-ellipsis: 3 行超出后显示...

其他

  • mask: 遮罩层
  • toast: toast 层
  • disable-scroll: 禁止滚动
  • bold: 粗体

responsive.css

  • 如果移动端设计稿使用宽度为 750, 在标签上使用class="size750", 长度单位一律用 rem, 长度值一律使用设计稿 px 单位除以 100
  • only-wap: 只在移动端显示, pc 端隐藏
  • only-pc: 只在 pc 端显示, 移动端隐藏