This lesson is exclusive to members

Responsive Web Design Essentials - HTML5 CSS3 Bootstrap

How to edit Bootstrap carousel off for mobile timing fade

Daniel Walter Scott

Download Exercise Files Download Completed Files

Contents

Certificates

We’re awarding certificates for this course!

Check out the How to earn your certificate video for instructions on how to earn yours and click the available certificate levels below for more information.

Introduction

I recommend hosting your new website with Bluehost, you can get a big discount by signing up with this link: https://www.bluehost.com/track/byol/byol_webess_122

You need to be a member to view comments.

Join today. Cancel any time.

Sign Up
Hello there, in this video we are going to mess around with our Carousel. Obviously we're messing with the timing because it is flying. We're also messing around with the transition. So you can see it kind of fading, rather than sliding. So let's jump in and work out what we're doing. 

All right, Carousel, me and you, you've been annoying me all this course. I love Carousels, just not when I'm teaching, they're distracting, but we want to do a couple of things. The first one's going to be, is turning it off when it gets to mobile. Just too small, and it's not what I want on mobile devices. So let's go and disable it. We did this earlier, so it's a good recap. How do I disable, we know it's like, display:none. Remember, from our earlier days. In here, under 'Utilities', there's one called 'Display'. You can have a little look through, I find this little list really helpful. It gives you an explanation, and then what to do. 

So 'Hidden only on XS', which is what I want. I'm going to turn it off for all of them, and turn it back on for Small. In my case I'm only going to turn it back on for Medium. So I'm going to grab all of that, actually I don't want all the full stop. So I'm just going to probably-- we'll paste it in. So where is my Carousel? There you are, buddy. So what I'd like to do is, I've got some Classes, I got Carousel Slide at the moment. I'm going to put in these without the colons. Sorry, without the full stops, or periods. 

So you, you, and I want this one to turn on, when it gets to the bigger device, like an iPad. Let's have a little look. So it's off, on there, there's the big slider. And then it turns off at some stage, still there, still there. Gone. Yep, gone. So we've turned it off, and turned it back on at this slightly bigger size. 

Next thing I want to do is I want to do the Fade. So let's have a little look at the different options that are available. It's under 'Components'. And where is our Carousel? So it's interesting to have a look through all of this, explaining what it does, the different controls. What we want to do is, I want to find the one with Captions Crossfade. Oh, Carousel Fade, that's what I want to do. What does that look like? Yep, that works for me. Come here, buddy. We're going to add it, and just add it after this, there we go. 

Hopefully I'll have a nice fading one. See how it goes, let's get up to our bigger size. And wait for it, hey. My one's not perfect because the Fade is, not like-- it's because I've got transparency on the background of mine, I've used P & G's as these little images, so that I could see through to the Background Gradient. If you've got a full image, Fade looks a lot nicer, it's a little bit jumpy, because I've got transparent background, but nice work. 

Last thing I want to do with the Carousel, and, like I, I guess we're at a point now, where actually we know how to go in, work with the documentation, figure out things on our own now. And I guess that's the whole point of this, like we could go through every feature of Carousel, and then Cards, and all of them. I'm just getting us to a point where our mock-up looks kind of good, and hopefully I'm kind of beating into you the different kind of, well the techniques for finding what you need in Bootstrap, and applying to your website in VS Code. And I'm getting kind of close to the end of this course, it's pretty exciting. 

I hope you are getting used to this kind of finding it, and a little bit of problem solving. Let's say I want to work with the timing. Like this one here, Interval looks pretty good, and there is, Data Interval looks pretty good. Now remember, this is milliseconds. So that's 10 seconds, 2 seconds. So it looks like it has to go on something called the Carousel Item Active. Let's grab that part, and see if we can add it, because by default I have no idea what it is. Let's see what it is here. 

Maybe it doesn't have a default. All right, there's my Carousel Item Active, there is no default. So let's say I put in this one, and let's say we put it down to something real quick. We'll do it to all of them actually, and just to prove a point, half a second. I've actually put it in the wrong place. We'll put it inside of the Class. Let's just have a little look at the documentation. So it's outside of the Class, it's actually just another property. And I'll do the same on this one here as well, and this one. I paste these guys in, and let's see how it works. 

Let's look at our example, there we go. Took a little while to get going, I was like, "Hmm, why aren't you working?" You can see it's flicking through them real quick now. So obviously you can change and be individual, you might have testimonials. Some of them are longer than others. So one could be like a min and a half, whereas the other guys could be nice and fast. You don't need to watch this, do you? You get what I mean. 

So again, we are getting close to the end of the course, and we're not covering every single part of Bootstrap or Web Design in general. I'm hoping though you're getting a good sense of how to find and tackle, and where things need to go, what you need to do yourself, and what you can rely on for things like Bootstrap. 

All right, let's get on to one of the last parts, where we start looking at the Cards, and finishing those off. See you in the next video.