這是我的第一篇文章,我開始與網頁設計實驗,所以我把模板從這裏:爲什麼我的利潤率不會改變? (CSS)
http://www.onextrapixel.com/2013/06/24/creating-a-swipeable-side-menu-for-the-web/
我試圖更改頁邊距在CSS。儘管無論我嘗試什麼,但我似乎無法獲得任何地方。我有下面列出的代碼。
編輯:我試圖讓p標籤在右邊15px中移動。我也有Jsfiddle鏈接。我也爲沒有加載的圖像道歉。這個網站並沒有像我在高中上課時那樣生活。
編輯2:我現在工作。
https://jsfiddle.net/zbd9Lvph/
body, html {
height: 100%;
margin: 0;
overflow-x:hidden;
overflow-y:scroll;
font-family: helvetica, Times;
font-weight: 100;
}
.container {
position: relative;
height: 100%;
width: 100%;
left: 0;
-webkit-transition: left 0.3s ease-in-out;
-moz-transition: left 0.3s ease-in-out;
-ms-transition: left 0.3s ease-in-out;
-o-transition: left 0.3s ease-in-out;
transition: left 0.3s ease-in-out;
}
.container.open-sidebar {
left: 240px;
}
#sidebar {
position: absolute;
left: -240px;
background: #007A00;
width: 240px;
height: 100%;
box-sizing: border-box;
}
#sidebar ul {
margin: 0;
padding: 0;
list-style: none;
}
#sidebar ul li {
margin: 0;
}
#sidebar ul li a {
padding: 15px 20px;
font-size: 16px;
font-weight: 100;
color: white;
text-decoration: none;
display: block;
border-bottom: 1px solid #005500;
-webkit-transition: background 0.3s ease-in-out;
-moz-transition: background 0.3s ease-in-out;
-ms-transition: background 0.3s ease-in-out;
-o-transition: background 0.3s ease-in-out;
transition: background 0.3s ease-in-out;
}
#sidebar ul li:hover a {
background: #00CC00;
}
.main-content {
width: 100%;
height: 100%;
padding: 10px;
box-sizing: border-box;
-moz-box-sizing: border-box;
position: relative;
}
.main-content .content{
box-sizing: border-box;
-moz-box-sizing: border-box;
padding-left: 60px;
width: 100%;
float: left;
margin-right:15px;
}
.main-content .content h1{
font-weight: 700;
}
.main-content .content p{
width: 100%;
line-height: 160%;
margin-right:10px;
}
.main-content #sidebar-toggle {
background: #007A00;
border-radius: 3px;
display: block;
position: relative;
padding: 10px 7px;
float: left;
}
.main-content #sidebar-toggle .bar{
display: block;
width: 18px;
margin-bottom: 3px;
height: 2px;
background-color: #fff;
border-radius: 1px;
}
.main-content #sidebar-toggle .bar:last-child{
margin-bottom: 0;
}
.center{
text-align: center;
}
#ctext{
position: fixed;
bottom: 25px;
right: 25px;
}
如果有人可以幫助我將非常感激。遊戲中還是比較新的,所以我正在試圖找出一些東西。
您是否也可以包含HTML?或創建一個小提琴? http://jsfiddle.net/ – Aaron
你試圖改變哪些利潤?當你改變它們時發生了什麼?你期望發生什麼? – Shaggy
你能否請嘗試在[JSFiddle](http://jsfiddle.net/)中重新創建該問題?你沒有給我們足夠的信息來解決這個問題。 –