页面侧面有一个空白区域,无法摆脱它

时间:2015-06-18 14:20:56

标签: html css twitter-bootstrap carousel

所以在Carousel的右侧有一个白色的间隙,我试图抓住它,但无法弄明白。如果有人知道如何修复它会有很大帮助。我真的不知道什么是错的所以我做了一个Jsfiddle并在下面添加了css代码。谢谢你的帮助。

Jsfiddle

html,
body {
height: 100%;
width: 100%;
margin: none;
padding: none;
}   


@media(min-width:767px) {
.navbar {
    padding: 20px 0;
    -webkit-transition: background .5s ease-in-out,padding .5s ease-in-      out;
    -moz-transition: background .5s ease-in-out,padding .5s ease-in-out;
    transition: background .5s ease-in-out,padding .5s ease-in-out;
}

.top-nav-collapse {
    padding: 0;
}
}

.carousel,
.item,
.active {
height: 100%;
}

.carousel-inner {
height: 100%;
}

.fill {
margin-right: -50px;
width: 100%;
height: 100%;
background-position: center;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
-o-background-size: cover;
}

.intro-section {
height: 100%;
padding-top: 150px;
text-align: center;
background: #fff;
}

4 个答案:

答案 0 :(得分:1)

只需将Bootstrap的代码覆盖为0px:

.row {
    margin-right: 0;
    margin-left: 0;
}

所以它看起来像这样:

{{1}}

这使滚动条消失。

答案 1 :(得分:1)

您需要从.row{ margin-right: -15px; margin-left: -15px; }

中删除边距

由此:

.row{
margin-right: 0px;
margin-left: 0px; 
}

对此:

CREATE PROCEDURE [dbo].[RemoveDefaultConstraints] @table_name nvarchar(256), @column_name nvarchar(256)
AS
BEGIN

    DECLARE @ObjectName NVARCHAR(100)

    START: --Start of loop
    SELECT 
        @ObjectName = OBJECT_NAME([default_object_id]) 
    FROM 
        SYS.COLUMNS
    WHERE 
        [object_id] = OBJECT_ID(@table_name) 
        AND [name] = @column_name;

    -- Don't drop the constraint unless it exists
    IF @ObjectName IS NOT NULL
    BEGIN
        EXEC ('ALTER TABLE '+@table_name+' DROP CONSTRAINT ' + @ObjectName)
        GOTO START; --Used to loop in case of multiple default constraints
    END
END
GO

-- How to run the stored proc.  This removes the default constraint(s) for the enabled column on the User table.
EXEC [dbo].[RemoveDefaultConstraints] N'[dbo].[User]', N'enabled'
GO

-- If you hate the proc, just get rid of it
DROP PROCEDURE [dbo].[RemoveDefaultConstraints]
GO

请参阅JSfiddle了解工作示例

答案 2 :(得分:0)

添加这个小CSS:

body{
    overflow-x: hidden;
}

FIDDLE:https://jsfiddle.net/lmgonzalves/zqrpg882/1/

答案 3 :(得分:0)

将行包裹在容器内。不使用容器并直接使用行将使其创建空白区域,因为它具有负边距。第78行:

cd /home/git/gitlab; \
  sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production; \
  sudo service gitlab stop; \
  sudo -u git -H ruby -Ilib -e 'require "gitlab/upgrader"' -e 'class Gitlab::Upgrader' -e 'def latest_version_raw' -e '"v7.11.3"' -e 'end' -e 'end' -e 'Gitlab::Upgrader.new.execute' -- -y; \
  cd /home/git/gitlab-shell; \
  sudo -u git -H git fetch; \
  sudo -u git -H git checkout v`cat /home/git/gitlab/GITLAB_SHELL_VERSION`; \
  cd /home/git/gitlab; \
  sudo service gitlab start; \
  sudo service nginx restart; \
  sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

JSfiddle