首页 > 其他分享 >FreeCodeCamp-通过创作罗斯科绘画学习 CSS 盒子模型

FreeCodeCamp-通过创作罗斯科绘画学习 CSS 盒子模型

时间:2023-05-06 12:56:35浏览次数:130  
标签:3px background 罗斯 height width CSS FreeCodeCamp border color

index.html

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Rothko Painting</title>
    <link href="./styles.css" rel="stylesheet">
  </head>
  <body>
    <div class="frame">
      <div class="canvas">
        <div class="one"></div>
        <div class="two"></div>
        <div class="three"></div>
      </div>
    </div>
  </body>
</html>

​styles.css

.canvas {
  width: 500px;
  height: 600px;
  background-color: #4d0f00;
  overflow: hidden;
  filter: blur(2px);
}

.frame {
  border: 50px solid black;
  width: 500px;
  padding: 50px;
  margin: 20px auto;
}

.one {
  width: 425px;
  height: 150px;
  background-color: #efb762;
  margin: 20px auto;
  box-shadow: 0 0 3px 3px #efb762;
  border-radius: 9px;
  transform: rotate(-0.6deg);
}

.two {
  width: 475px;
  height: 200px;
  background-color: #8f0401;
  margin: 0 auto 20px;
  box-shadow: 0 0 3px 3px #8f0401;
  border-radius: 8px 10px;
  transform: rotate(0.4deg);
}

.one, .two {
  filter: blur(1px);
}

.three {
  width: 91%;
  height: 28%;
  background-color: #b20403;
  margin: auto;
  filter: blur(2px);
  box-shadow: 0 0 5px 5px #b20403;
  border-radius: 30px 25px 60px 12px;

}

标签:3px,background,罗斯,height,width,CSS,FreeCodeCamp,border,color
From: https://www.cnblogs.com/is-wgy/p/17376905.html

相关文章

  • css随着浏览器窗口width度变化展示数据
    这是需求这是通过css写法实现的@mediascreenand(min-width:1900px){//>=1900的设备.boxWidth{width:25%;}}@mediascreenand(min-width:1440px)and(max-width:1899px){.boxWidth{width:33%;}}@mediascreen......
  • uniapp使用scss定义全局css
    1.新建scss文件,定义各种全局css样式$orange:#ee5313!default;//主题色:橙色$darkOrange:#d43a11;//深橙色$color:#333;$gray:#999;//灰色$lightGray:#bbb;//浅灰$grayBg:#f3f3f3!important;//body灰色背景$white:#fff;//白色$blue:#1a......
  • web网页在手机端打开后左右可以滑动的css bug怎么解决
    web网页在手机端打开后左右可以滑动的cssbug怎么解决这个问题通常是由于在移动设备上使用了固定宽度的元素或容器而导致的。解决这个问题的一种方法是使用CSS媒体查询来检测移动设备,并将容器的宽度设置为100%。具体操作如下:@mediaonlyscreenand(max-width:768px){.cont......
  • FreeCodeCamp-通过编写注册表单学习 HTML 表单
    index.html<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>RegistrationForm</title><linkrel="stylesheet"href="styles.css"/></h......
  • CSS实现单行、多行文本溢出显示省略号
    代码单行文字溢出打点div{width:100px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}多行文字溢出打点div{width:100px;overflow:hidden;text-overflow:ellipsis;......
  • css中filter的部分特别用法
    1. drop-shadow函数如果给png的图片设置阴影通过box-shadow就会变成这样但可以通过fliter来重新实现 会变成这样.header{//box-shadow:10px10px10px#000;filter:drop-shadow(10px10px10pxrgba(0,0,0,.5));}  2.hue-roate函数.header{filter:......
  • 页面引入css样式时,使用link和@import有什么区别
    css文件引入的方式有两种:1.HTML中使用link标签<linkrel="stylesheet"href="style.css/>2.css中使用@import@import"style.css"/*使用字符创*/@importurl("style.css")/*使用url地址*/link和@import区别link属于HTML标签,除了加载css外,还可以做很多其的他事,比......
  • DevTools failed to load source map: Could not load content for https://xxxxx/boo
    DevToolsfailedtoloadsourcemap:Couldnotloadcontentforhttps://xxxxx/bootstrap-theme.css.map:HTTPerror:statuscode404,net::ERR_HTTP_RESPONSE_CODE_FAILURE这个错误意味着浏览器无法加载指定的CSSsourcemap文件。CSSsourcemap文件通常用于调试前端......
  • 完美的背景图全屏css代码 – background-size:cover?
    写主题样式的时候经常会碰到用背景图铺满整个背景的需求,这里分享下使用方法需要的效果图片以背景的形式铺满整个屏幕,不留空白区域保持图像的纵横比(图片不变形)图片居中不出现滚动条多浏览器支持以图片bg.jpg为例方法一、最简单,最高效的方法 CSS3.0归功于css3.0新增的一......
  • 关于vue2中使用unocss样式无法生效的问题
    前言在维护公司一个技术栈为vue2+ts+unocss的老项目时发现unocss在开发环境和正式环境都不能生效,最先以为是插件的版本问题,排查后发现是因为项目在使用unocss时的配置没有配置完全,根据vue-cli的版本按照unocss的官方仓库里的example配置vue.config.js这是v......