요소의 최소 및 최대 너비를 설정하려면 다음 코드를 실행할 수 있습니다.
예시
<!DOCTYPE html> <html> <head> <style> div { max-width: 300px; min-width: 100px; background-color: red; } </style> </head> <body> <p> Below is a div with maximum and minimum width. Resize the web browser to see the effect.</p> <div>This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. </div> </body> </html>
출력