从侧栏删除滚动条

时间:2015-05-08 09:45:29

标签: jquery html css twitter-bootstrap

我想删除侧边栏上的滚动条,你可以看一下这个bootply:

http://www.bootply.com/DbyYVRupPJ

我尝过这样的东西

FIDDLE

#sidebar{
    width: 200px;
    border: 1px solid #000;
    height: 100%;
}

但我无法正常使用

有人能帮帮我吗? :)

编辑:滚动功能仍应处于活动状态

2 个答案:

答案 0 :(得分:3)

Use something like the following code:

GET

Fiddle http://jsfiddle.net/qcv5Q/671/ or http://jsfiddle.net/qcv5Q/672/ if you don't want to have visible scrollbar

答案 1 :(得分:0)

Add the last propierty "overflow-y: hidden". Or if you want to remove the x-axis so.. overflow-x: hidden.

// Use Parse.Cloud.define to define as many cloud functions as you want.
// For example:
Parse.Cloud.job("locationCleanUp", function(request, response) {

    var setLocation = function(longitude,latitude) {

        var point = new Parse.GeoPoint({latitude:latitude, longitude:longitude});

        console.log(point);

        return point;

    };

    var date = new Date("2015-05-08");
    var site = Parse.Object.extend("WeatherSitelistCodes");
    var query = new Parse.Query("WeatherSitelistCodes");
    query.lessThan("updatedAt",date);

    query.each(

        function(result) {
            var lat = parseFloat(result.get("latitude"));
            var longi = parseFloat(result.get("longitude"));
            var newLocation = setLocation(longi,lat);
            var location = JSON.stringify(result.get("location"));

            console.log("Location: " + result.get("name"));

                result.save({
                    location: newLocation
                },{
                    success: function(result) {
                        console.log("Saved!");

                    },

                    error: function(result, error) {
                        console.log("Error" + error.message);
                    }
                });

            },{
            success: function() {
            // results is an array of Parse.Object.
            console.log('Done!');
            response.success("Updated Records!!");
              },
            error: function(error) {
            // error is an instance of Parse.Error.
            console.log('Error: +' error.message);
            response.error("Failed to save vote. Error=" + error.message);
            }
        });
});

Or if you want that to adjust to the content you have to write:

-(void)viewDidLoad
{
UIPinchGestureRecognizer * pinch = [[UIPinchGestureRecognizer alloc]initWithTarget:self action:@selector(twoFingerPinch:)];
[imageView addGestureRecognizer:pinch];
[imageView setUserInteractionEnabled:YES];
pinch.delegate = self;
}

- (void)twoFingerPinch:(UIPinchGestureRecognizer *)recognizer
{
    CGFloat scale = recognizer.scale;
    imageView.transform = CGAffineTransformScale(imageView.transform, scale, scale);
    recognizer.scale = 1.0;
}

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
{
 return NO;  

}