首页 > 原创文章 > 软件开发 > 查看文章

一些常用的CSS代码分享

所属分类:软件开发 来源: 丁老师原创 更新时间:2026-03-27 09:32 浏览: 352 IP属地: 深圳

flex-space-between

display:flex;justify-content:space-between;

flex-column

display:flex;flex-flow:column;

flex居中

display:flex;flex-flow:column;justify-content:center;align-items:center;

absolute居中

position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);

阴影

box-shadow:0 0 5px 5px #ccc;

动画

transition:all 0.3s;

文字超出长度自动隐藏显示省略号

display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden;

全局

* {-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-font-smoothing: antialiased;line-height:1.6;}
*:focus {outline:none;background-color:transparent;}
body,html {margin:0;padding:0;}
h1,h2,h3,h4,h5,h6 {margin:0;padding:0;}
a,s,em,u,i {font-style:normal;text-decoration:none;}
b,strong {font-weight:bold;}
p,pre,form {margin:0;}
a img {width:100%;}
dl,dt,dd,menu,ol,ul,li {margin:0;}
nav ul,nav ol,li {list-style:none;list-style-image:none;}
img {display:block;border:0;-ms-interpolation-mode:bicubic;margin:0;}
button,input,select,textarea {font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;-webkit-appearance:none;border:none;outline:none;}

.ellipsis {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.hidden {display:none;}


标签:

相关文章

微信小程序开发用Vue2和Vue3好?有什么...

有新入行同学向丁老师咨询,在使用Uniapp做微信小程序时,是选择Vue2还是Vue3呢?哪个开发微信小程序更好一点,两者有什么区别呢?今天丁老师给大家介绍一下。首先,我们来介绍一下Vue2和Vue3。Vue2和Vue3是Vue.js框...

PHP提示Array and string ...

在使用PHP开发的程序时,突然遇到错误,查看错误日志发现提示:Array and string offset access syntax with curly braces is no longer supported,这是怎么回事呢?...

Composer更新指定包

composer更新指定包的命令composer require alibabacloud/dysmsapi-20170525:2.0.24 --ignore-platform-reqs composer update alibabac...

IDEA IDE换行自动显示的}括号如何去掉

在使用idea旗下的产品,如intellij idea,php storm,web storm时,有的时候编辑前端页面JS,在换行时经常会自动出现个}大括号,这一点程序不是很智能,其实后边都已经有括号了。比如下图这样:那么如何解决这个问...

推荐文章

Composer self-update 更...

1. composer版本更新文档版本号:https://getcomposer.org/download中文网:https://docs.phpcomposer.com/03-cli.html#self-update英文网:https:/...

Javascript复制对象改变原值的解决办...

在进行vue开发中,经常会遇到复制对象,赋值新对象后,原对象值被改变的问题,举个例子:let old={ "a":1, "b":2 } let new=old; new['c']=3;...

FastAdmin后台列表默认分页数量由10...

没那么多废话,直接上修改方法public\assets\js\require-table.jspageSize: Config.pagesize || localStorage.getItem("pagesize") |...

百度编辑器ueditor自动添加p标签换行的...

在实际工作中发现,有个编辑器每次保存或者修改后,都会自动在内容顶部和底部增加几行,烦人的很,一直找不到解决办法。后来发现原来是自己代码的问题。解决办法:内容在textarea中,不要换行不要写成:<textarea{content} ...

当前在线
免费咨询