最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

I am following the BattleCss Online daily quest and the html and css design I have to implement says I have to get halfsemi-circ

programmeradmin1浏览0评论

I really do not know how to make the curve designs on my page. All other parts of the design had been finalized by me. The yellow curves at the two ends are the problem Now this is my html and css so far in the challenge:

<!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>new_web</title>
        <link rel="stylesheet" href="top.css">
        <style>
      body {
        display: flex;
        justify-content:center;
        align-items:center;
        background:#328FC1;
      }
      div {
        width: 140px;
        height: 140px;
        background: #FADE8B;
      }  
    </style>
    </head>
    <body>
    <div></div>
    </body>
    </html>

I tried using chatgpt and gemini to find a way around it but the concepts were overwhelming like svg and stuff I don't know about. I started by so far having learnt all the html and css properties from W3Schools and other sites

I really do not know how to make the curve designs on my page. All other parts of the design had been finalized by me. The yellow curves at the two ends are the problem Now this is my html and css so far in the challenge:

<!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>new_web</title>
        <link rel="stylesheet" href="top.css">
        <style>
      body {
        display: flex;
        justify-content:center;
        align-items:center;
        background:#328FC1;
      }
      div {
        width: 140px;
        height: 140px;
        background: #FADE8B;
      }  
    </style>
    </head>
    <body>
    <div></div>
    </body>
    </html>

I tried using chatgpt and gemini to find a way around it but the concepts were overwhelming like svg and stuff I don't know about. I started by so far having learnt all the html and css properties from W3Schools and other sites

Share Improve this question asked Jan 19 at 22:09 Frederick OppongFrederick Oppong 11 silver badge 2
  • You need to show us top.css, or much better even: make a runnable Stack Snippet. – Peter B Commented Jan 19 at 22:27
  • 2 CSSBattle is not really a site for beginners (but for code golfers). Their targets are for the most part not something you would encounter during everyday frontend work. – InSync Commented Jan 19 at 22:50
Add a comment  | 

1 Answer 1

Reset to default 1

Use radial-gradients at the corners.

* {
  margin: 0;
  padding: 0;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
}

::before,
::after {
  box-sizing: inherit;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #328FC1;
  min-height: 100vh;
  background-image: radial-gradient(circle at top left, #FADE8B 100px, transparent 100px), radial-gradient(circle at bottom right, #FADE8B 100px, transparent 100px);
}

div {
  width: 140px;
  height: 140px;
  background: #FADE8B;
}
<div></div>

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论