【发布时间】:2018-06-23 23:32:09
【问题描述】:
我创建了一个正常为矩形的 div,但我需要一个代码才能使 div 的下边缘倾斜,并且它下方的其他 div 也是如此(可能再次倾斜边缘)。任何帮助将不胜感激。 到目前为止,这是我的代码 sn-p:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Assignment</title>
<!-- Bootstrap Styling css-->
<style type="text/css">
.container{
width: 100%;
padding-top: 25px;
background-color: black;
height: 300px;
}
#logo{
background-color: #FFFFFF;
float: left;
border-radius: 20px;
}
#eduhead{
/*padding-left: 40px;*/
margin-left: 10px;
color: #3C89AA;
font-weight: bold;
}
#newref{
color: white;
font-size: medium;
text-align: right;
font-weight: lighter;
}
table{
width: 100%;
}
#signup{
color:#FFFFFF;
border-style: solid;
border-width: 2px;
border-color: #3C89AA;
border-radius: 5px;
}
</style>
</head>
<body>
<div class="container">
<table>
<tr>
<th></th>
<th id="eduhead"><img src="assets/Group 31.png" id ="logo"
alt="img"> ASSIGNMENT</th>
<th><a href="" title="Blog" id="newref">Blog</a></th>
<th><a href="" title="Packages" id="newref">Packages</a></th>
<th><a href="" title="Login" id="newref">Login</a></th>
<th><a href="" title="Sign Up" id="signup">Sign Up</a></th>
</tr>
</table>
</div>
<!--Including all the JavaScript Files of bootstrap-->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js">
</script>
<!--Bootstrap Scrit CDN-->
以上是我的代码,包括 Bootstrap 的所有 CDN。有什么建议吗?
【问题讨论】:
-
你能更精确的输出你想要的结果吗
-
我希望 div(结束边缘)向右上角倾斜。 @TemaniAfif
-
可以分享截图吗?你也能让你的代码工作吗?
-
是的,但是你能告诉我如何在这里分享屏幕截图吗?
-
当您编辑问题时,您有一个按钮可以在顶部添加图像