Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

许茹杰的作业 #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,249 changes: 1,249 additions & 0 deletions css/demo1.css

Large diffs are not rendered by default.

74 changes: 74 additions & 0 deletions css/demo8.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
.a{
width: 600px;
height: 80px;
}
.a1{
float: left;
width: 75%;
height: 100%;
}
.a11{
background-color: #3b8de3;
float: left;
width: 66.66%;
height: 50%;
}
.a12{
background-color: red;
float: left;
width: 33.34%;
height: 50%;
}
.a2{
float: left;
width: 25%;
height: 100%;
}
.a21{
background-color: lime;
width: 100%;
height: 25%;
}
@media screen and (max-width: 1200px){
.a12{
display: none;
}
.a{
width: 450px;
}
.a1{
width: 66.66%;
}
.a2{
width: 33.34%;
}
.a11{
width: 100%;
}
}
@media screen and (max-width: 900px){
.a2{
display: none;
}
.a1{
width: 100%;
}
.a11{
width: 100%;
}
.a{
width: 300px;
}
}
/*
max-width代表小于这个值时执行
min-width代表大于这个值时执行
device-aspect-ratio可以用来适配特定屏幕长宽比的设备,这也是一个很有用的属性,
比如,我们的页面想要对长宽比为4:3的普通屏幕定义一种样式,然后对于16:9和16:10的宽屏,
定义另一种样式,比如自适应宽度和固定宽度:
@media only screen and (device-aspect-ratio:4/3)
作者:ZombieBrandg
链接:https://www.jianshu.com/p/982c9f2d186f
来源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。
*/
56 changes: 56 additions & 0 deletions css/demo88.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
.a{
width: 300px;
height: 80px;
}
.a1{
width: 100%;
height: 100%;
}
.a11{
background-color: lime;
width: 100%;
height: 50%;
}

@media screen and (min-width: 900px){
.a{
width: 450px;
}
.a1{
float: left;
width: 66.66%;
}
.a2{
float: left;
width: 33.34%;
height: 100%;
}
.a21{
width: 100%;
height: 25%;
background-color: blue;
}
}
@media screen and (min-width: 1200px){
.a{
width: 600px;
}
.a1{
width: 75%;
}
.a2{
width: 25%;
}
.a11{
float: left;
width: 66.66%;
}
.a12{
float: left;
width: 33.34%;
height: 50%;
}
.a2{
width: 25%;
}
}
117 changes: 117 additions & 0 deletions css/demo9.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
.a{
width: 600px;
height: 80px;
}
.a1{float: left;
height: 100%;
}
.a2{float: left;
height: 100%;
}
.a11{float: left;
background-color: lime;
height: 50%;
}
.a12{float: left;
background-color: #3b8de3;
height: 50%;
}
.a21{
background-color: black;
height: 25%;
width: 100%;
}



.l-0{
width: 0;
}
.l-1{
width: 8.3333333%;
}
.l-2{
width: 16.66666%;
}
.l-3{
width: 25%;
}
.l-4{
width: 33.33333333%;
}
.l-5{
width: 41.33333333%;
}
.l-6{
width: 50%;
}
.l-7{width: 58.3333333%}
.l-8{width: 66.66666666%}
.l-9{width: 75%}
.l-10{width: 83.3333333%}
.l-11{width: 91.66666%}
.l-12{width: 100%}
@media screen and (max-width: 1200px){
.a{
width: 450px;
}
.s-0{
width: 0;
}
.s-1{
width: 8.3333333%;
}
.s-2{
width: 16.66666%;
}
.s-3{
width: 25%;
}
.s-4{
width: 33.33333333%;
}
.s-5{
width: 41.33333333%;
}
.s-6{
width: 50%;
}
.s-7{width: 58.3333333%}
.s-8{width: 66.66666666%}
.s-9{width: 75%}
.s-10{width: 83.3333333%}
.s-11{width: 91.66666%}
.s-12{width: 100%}
}
@media screen and (max-width: 900px){
.a{
width: 300px;
}
.z-0{
width: 0;
}
.z-1{
width: 8.3333333%;
}
.z-2{
width: 16.66666%;
}
.z-3{
width: 25%;
}
.z-4{
width: 33.33333333%;
}
.z-5{
width: 41.33333333%;
}
.z-6{
width: 50%;
}
.z-7{width: 58.3333333%}
.z-8{width: 66.66666666%}
.z-9{width: 75%}
.z-10{width: 83.3333333%}
.z-11{width: 91.66666%}
.z-12{width: 100%}
}
121 changes: 121 additions & 0 deletions css/demo99.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
.a{
width: 300px;
height: 80px;
}
.a1{float: left;
height: 100%;
}
.a2{float: left;
height: 100%;
}
.a11{float: left;
background-color: lime;
height: 50%;
}
.a12{float: left;
background-color: #3b8de3;
height: 50%;
}
.a21{
background-color: black;
height: 25%;
width: 100%;
}



.l-0{
width: 0;
}
.l-1{
width: 8.3333333%;
}
.l-2{
width: 16.66666%;
}
.l-3{
width: 25%;
}
.l-4{
width: 33.33333333%;
}
.l-5{
width: 41.33333333%;
}
.l-6{
width: 50%;
}
.l-7{width: 58.3333333%}
.l-8{width: 66.66666666%}
.l-9{width: 75%}
.l-10{width: 83.3333333%}
.l-11{width: 91.66666%}
.l-12{width: 100%}

@media screen and (min-width: 900px){
.a{
width: 450px;
}
.z-0{
width: 0;
}
.z-1{
width: 8.3333333%;
}
.z-2{
width: 16.66666%;
}
.z-3{
width: 25%;
}
.z-4{
width: 33.33333333%;
}
.z-5{
width: 41.33333333%;
}
.z-6{
width: 50%;
}
.z-7{width: 58.3333333%}
.z-8{width: 66.66666666%}
.z-9{width: 75%}
.z-10{width: 83.3333333%}
.z-11{width: 91.66666%}
.z-12{width: 100%}
}


@media screen and (min-width: 1200px){
.a{
width: 600px;
}
.s-0{
width: 0;
}
.s-1{
width: 8.3333333%;
}
.s-2{
width: 16.66666%;
}
.s-3{
width: 25%;
}
.s-4{
width: 33.33333333%;
}
.s-5{
width: 41.33333333%;
}
.s-6{
width: 50%;
}
.s-7{width: 58.3333333%}
.s-8{width: 66.66666666%}
.s-9{width: 75%}
.s-10{width: 83.3333333%}
.s-11{width: 91.66666%}
.s-12{width: 100%}
}

Loading