/*
文字换行
*/
.break-work
{
/* 强制不换行 */
white-space: nowrap;
/* 自动换行 */
word-wrap: break-word;
word-break: normal;
/* 强制英文单词断行 */
word-break: break-all;
}
/*
两端对齐
*/
.textAlign
{
text-align: justify;
text-justify: inter-ideogra;
}
/*
去掉Webkit(chrome)浏览器中input(文本框)或textarea的黄色焦点框
*/
input,
button,
select,
textarea
{
outline: none;
}
textarea
{
font-size: 13px;
resize: none;
}
/*
清除浮动1
*/
.clearfix:after
{
font-size: 0;
display: block;
visibility: hidden;
clear: both;
height: 0;
content: ' ';
}
.clearfix
{
display: inline-block;
}
html[xmlns] .clearfix
{
display: block;
}
* html .clearfix
{
height: 1%;
}
.clearfix
{
*zoom: 1;
}
.clearfix:after
{
display: table;
clear: both;
content: '';
}
.clearfix
{
overflow: hidden;
_zoom: 1;
}
/*
清除浮动2
*/
.clearfix
{
zoom: 1;
}
.clearfix:before,
.clearfix:after
{
display: table;
content: ' ';
}
.clearfix:after
{
clear: both;
}
/*文字过多后显示省略号*/
.ellipsis,
.ell
{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
/*
mac font: osx平台字体优化
*/
body
{
font-family: 'Hiragino Sans GB','Hiragino Sans GB W3','微软雅黑';
}
/*
min-height: 最小高度兼容代码
*/
.minheight500
{
overflow: visible;
height: auto !important;
height: 500px;
min-height: 500px;
}
/*
鼠标不允许点击
*/
.ban-click
{
cursor: not-allowed;
}
常用前端css代码
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- 1.不要在自闭合的元素尾部添加斜线(h5规范)。 2.为每一个html页面的第一行添加标准模式。 3.为根元素制定...
- 每个人都希望自己有很好的异性缘邂逅美好的爱情,拥有幸福的生活。但并不是每一个桃花运都是那么的好。桃花运旺盛人意味着...