美文网首页
常用前端css代码

常用前端css代码

作者: Top_Chenxi | 来源:发表于2016-05-27 09:49 被阅读148次
/*
    文字换行 
*/
.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代码

      本文链接:https://www.haomeiwen.com/subject/afoxdttx.html