一、为3个控制元素添加对应CSS样式
提示: 块级元素的宽度和高度如果设置为100%则会和父元素一样。
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>慕课网-Resizable</title> <style type="text/css"> body{ margin: 0px;padding: 50px;font-size: 14px;color: #333; } .panel{ width: 400px;height: 240px; border:1px solid #ccc; } .panel .title{ background-color: #eee;text-align: center;line-height: 30px; border: 1px solid #fff; font-weight: bold; } .ui-Resizable-r{ /* 右侧控制元素样式 */ } .ui-Resizable-b{ /* 底边控制元素样式 */ } .ui-Resizable-rb{ /* 右下角控制元素样式 */ } </style> </head> <body> <div class="panel"> <div class="title">Resizable Panel</div> <div class="ui-Resizable-r"></div> <div class="ui-Resizable-b"></div> <div class="ui-Resizable-rb"></div> </div> </script> </body> </html>