"일꾼이 일을 잘하려면 먼저 도구를 갈고 닦아야 한다." - 공자, 『논어』.
첫 장 > 프로그램 작성 > CSS3 및 SVG를 사용하여 테두리로 물결 모양을 만듭니다

CSS3 및 SVG를 사용하여 테두리로 물결 모양을 만듭니다

2025-04-12에 게시되었습니다
검색:698

How to Create a Wave Shape with a Border Using CSS3 and SVG?

구현 :

는 하단 테두리가있는 컨테이너 div를 생성하는 것으로 시작하십시오. 컨테이너 내에 컨텐츠와 SVG를 파도 모양으로 놓습니다. Float the SVG to the right.

SVG Design:

Craft the wave shape using paths to define the shape and fill it with white. 다음으로, 스트로크 속성을 사용하여 테두리를 정의하고 투명하게 채우기를 정의하고

최종 실행 :

body {
  background: #007FC1;
}
.container {
  border-bottom: 4px solid #B4CAD8;
}
.container {
  background-color: #fff;
}
.container > .text {
  padding: 0.5em;
}
.panel {
  position: relative;
  float: right;
  margin-top: -4px;
}
body {
  background: #007FC1;
}
.container {
  border-bottom: 4px solid #B4CAD8;
}
.container {
  background-color: #fff;
}
.container > .text {
  padding: 0.5em;
}
.panel {
  position: relative;
  float: right;
  margin-top: -4px;
}

How to Create a Wave Shape with a Border Using CSS3 and SVG?

가 있습니다. 원하는 디자인과 일치하기 위해 필요에 따라 SVG의 치수와 위치를 조정하십시오.

예제 코드 :

body { 배경 : #007fc1; } .Container { 국경 바닥 : 4px 고체 #b4cad8; } .Container { 배경색 : #fff; } .Container> .Text { 패딩 : 0.5EM; } .Panel { 위치 : 상대; 플로트 : 오른쪽; 마진 -탑 : -4px; }

Lorem ipsum dolor sit amet, consectetur adipisicing elit. voluptates nam fuga eligendi ipsum sed ducimus quia adipisci atque atque anim quasi quidem perspiciatis totam soluta hic voluptem optio perferendis.

이것은 패널 입니다

최신 튜토리얼 더>

부인 성명: 제공된 모든 리소스는 부분적으로 인터넷에서 가져온 것입니다. 귀하의 저작권이나 기타 권리 및 이익이 침해된 경우 자세한 이유를 설명하고 저작권 또는 권리 및 이익에 대한 증거를 제공한 후 이메일([email protected])로 보내주십시오. 최대한 빨리 처리해 드리겠습니다.

Copyright© 2022 湘ICP备2022001581号-3