<rect>
<rect> 요소는 SVG 기본 모형이고 코너의 위치와 폭과 높이에 따라 사각형을 만드는데 사용된다. 또한 모서리가 둥근 사각형을 만들 수 있다.
<svg viewBox="0 0 220 100" xmlns="http://www.w3.org/2000/svg">
<!-- Simple rect element -->
<rect x="0" y="0" width="100" height="100" />
<!-- Rounded corner rect element -->
<rect x="120" y="0" width="100" height="100" rx="15" ry="15" />
</svg>
컨택스트 사용해보기
카테고리 | 기본 도형 요소, 그래픽 요소, 모형 요소 |
---|---|
허용 된 콘텐츠 | Any number of the following elements, in any order: Animation elements » Descriptive elements » |
규범 문서 | SVG 1.1 (2nd Edition) |
Example
간단한 rect
사용하기
라운드 코너와 rect 사용하기
속성
전역 속성
지정 속성
DOM Interface
This element implements the SVGRectElement
interface.
Browser compatibility
BCD tables only load in the browser