今天是2019年6月19日星期三,在這裏跟你們分享css基礎的第二部分單位、尺寸、溢出和邊框,下面是詳細的內容,請各位大佬積極改正!css
1、單位html
2、尺寸屬性字體
3、溢出spa
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>溢出屬性</title> <style> #box { width: 150px; height: 150px; border: 1px solid #333; overflow: hidden; /*overflow: scroll; overflow: auto;*/ } </style> </head> <body> <div id="box"> zhyzhyzhyzhyzhyzhyzhyzhyzhyzhyzhyzhyzhyzhyzhyzhyzhyzhy zhyzhyzhyzhyzhyzhyzhyzhyzhyzhyzhyzhyzhyzhyzhyzhyzhyzhy zhyzhyzhyzhyzhyzhyzhyzhyzhyzhy zhyzhyzhyzhyzhyzhy </div> </body> </html>
4、邊框code
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>邊框</title> <style> #box { width: 400px; height: 400px; border: 10px solid orange; /*border: 10px dotted orange; border: 10px dashed orange;*/ } </style> </head> <body> <div id="box">我是div</div> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>單項邊框</title> <style> #box { width: 300px; height: 300px; border-left: 10px solid #666; border-top: 10px dotted #456; border-right: 10px dashed #000; border-bottom:10px dotted #800080; } </style> </head> <body> <div id="box"></div> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>單邊框</title> <style> #box { width: 300px; height: 300px; border: 5px solid orange; border-color: #FF0000; } </style> </head> <body> <div id="box"></div> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>單邊框單屬性</title> <style> #box { width: 400px; height: 400px; border: 5px solid #008000; border-top-color: #800080; border-right-color: #E4393C; border-bottom-color: #FFA500; } </style> </head> <body> <div id="box"></div> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>單邊倒角</title> <style> #box { width: 300px; height: 300px; background: orange; border-top-left-radius: 20px; border-radius: 5px 20px 40px 100px; } </style> </head> <body> <div id="box"></div> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>邊框陰影</title> <style> #box { width: 300px; height: 300px; background: orange; box-shadow: 10px 10px 10px rgb(93,145,77); } </style> </head> <body> <div id="box"></div> </body> </html>
未完,待續!等待下次更新。。。。。。htm