美文网首页
css样式-例子

css样式-例子

作者: Ringo_Nanami | 来源:发表于2018-07-24 16:16 被阅读0次

效果图:

html代码:


scss代码:

*{

margin:0;

padding:0;

box-sizing: border-box;

}

@mixin boxCenter{

position:absolute;

margin:auto;

top:0;

left:0;

bottom:0;

right:0;

}

.activity{

width:412px;

height:496px;

/*background-color:pink;*/

font-size:12px;

font-weight:400;

color:#333;

padding:0 20px;

margin:100px auto;

border:1px solid #eee;

.title{

/*background-color:lightblue;*/

font-size:14px;

text-align:left;

height:52px;

line-height: 52px;

}

.photo{

/*background-color:cyan;*/

.phpto-box{

width:372px;

height:444px;

margin:0 auto;

position:relative;

/*background-color:gold;*/

.round-box{

width:220px;

height:220px;

border:1px solid #9CACBB;

border-radius:50%;

@include boxCenter;

.dash-box{

width: 90%;

    height: 90%;

    /*background-color: lightblue;*/

    border: 1px dashed #9CACBB;

    border-radius: 50%;

    @include boxCenter;

    .small-box{

    width: 90%;

    height: 90%;

    background-image:url(./../img/bg.png);

    background-repeat: no-repeat;

    background-position: center;

    background-size: contain;

    border-radius:50%;

        z-index: 100;

    @include boxCenter;

    }

}

$dotWidth:8px;$dotHeight:8px;

.pie{

position:absolute;

width: 50%;

    height: 50%;

    border: 1px solid #9CACBB;

    border-radius: 100% 0 0 0;

    transform-origin: 100% 100% 0;

    border-left: none;

    border-top: none;

    border-bottom: none;

    .dot{

    width:$dotWidth;

    height:$dotHeight;

    background-color:#9CACBB;

    border-radius:50%;

    position: absolute;

    right: -$dotWidth/2;

    top: -$dotWidth/2;

    }

    .data{

    padding:0 3px;

    text-align:center;

    position:absolute;

    top: 0;

    right: 0;

    margin-top: -60px;

    margin-right: -30px;

    transform-origin: 50% 50% 0;

        height: 50px;

line-height: 22px;

    .num{

    font-size:14px;

    color: #00A4D7;

    display: block;

    }

    }

    @for $i from 1 through 6{

    &.pie#{$i}{

    transform: rotate(($i - 1) * 60deg);

    .data{

transform: rotate(-($i - 1) * 60deg);

    }

    @if $i==3{

    .data{

margin-top: -80px;

    margin-right: -35px;

    }

    }@else if $i==4{

    .data{

    margin-right: -40px;

    }

    }@else if $i==5{

    .data{

margin-top: -80px;

margin-right: -35px;

    }

    }@else if $i==6{

    .data{

    margin-top: -65px;

    margin-right: -15px;

    }

    }

    }

    }

}

}

}

}

}

css代码:

1 2 3 4

相关文章

  • css样式-例子

    效果图: html代码: scss代码: *{ margin:0; padding:0; box-sizing: ...

  • 处理css

    官方例子通过style标签 通过link引入css,不能指定路径 通过useable控制样式显示 css tree...

  • css样式入门书目录

    css样式-字体属性 css样式-背景属性 css样式-边框属性 css样式-列表属性 css样式-定位属性 cs...

  • [jQuery]设置css样式

    获取css样式 设置单个css样式 设置多个css样式

  • CSS基础(二)

    1 - CSS样式的引入 CSS样式的引入可以采用三种方式: 内联式css样式 嵌入式CSS样式 外部式CSS样式...

  • 切图需要的准备

    样式 重置样式(reset.css) 公共样式(commo.css) 独立样式(例如首页:index.css) 重...

  • jQuery学习:css操作/属性操作

    css操作 修改单个样式.css(name,value) 修改多个样式.css(obj) 获取样式.css(nam...

  • CSS初级

    css样式表 css选择器(简单,复杂) css属性 css布局 CSS样式表(内联方式,内部样式表,外部样式表)...

  • CSS学习之CSS基础

    标签: 前端 css 样式 CSS样式 css全称为"层叠样式表(cascading style sheets)...

  • CSS3 表格布局 基本使用记录

    CSS 样式 border-collapse: collapse; 用于共享边框线 简单用法 例子整体代码 效果图

网友评论

      本文标题:css样式-例子

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