1、设置图片边框
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>设置图片边框</title>
<style type="text/css">
.i1{
border-width: 1px;
border-color: red;
border-style: solid;
}
.i2{
border: 2px red dashed;
}
.i3{
border: 2px red dotted;
}
.i4{
border-top: 6px red solid;
border-right:2px blue dashed;
border-bottom: 2px yellow dotted;
border-left: 2px blue dashed;
}
</style>
</head>
<body>
<h1>实线边框</h1>
<img src="../java2.jpg" class="i1"/>
<h1>虚线边框</h1>
<img src="../java2.jpg" class="i2"/>
<h1>点画线边框</h1>
<img src="../java2.jpg" class="i3"/>
<h1>给不同的边框设置样式</h1>
<img src="../java2.jpg" class="i4"/>
</body>
</html>
运行结果: