Sie sind auf Seite 1von 3

si componentele din inauntrul lui au ori latimi masurate in procente ori latimi fixe.

Lucrul important este ca elementul container ( invelisul ) este setat sa n u se miste. Indiferent de ce rezolutie a ecranului au vizitatorii, el sau ea vor vedea aceeasi latime ca si ceilalti vizitatori. Imaginea de mai sus arata contu rul general al unui aspect de site cu latimea fixa. Componentele din inauntru su nt fixate la 520, 200, respectiv 200 pixeli. O latime de 960 pixeli a devenit st andard in web designul modern pentru ca cei mai multi utilizatori se presupune c a navigheaza intr-o rezolutie de 1024-768 sau mai mare. b. Aspecte fluide Intr-un aspect fluid, de asemenea mentionat ca un aspect lichid, majoritatea com ponentelor dinauntru au latimi masurate in procente, si prin urmare ajusteaza re zolutia ecranului utilizatorilui. Imaginea de mai sus arata un aspect fluid. In timp ce cativa designeri pot seta latimile anumitor elemente in aspectele fluide , cum ar fi marginile, aspectul in general foloseste latimile masura in procente , astfel incat vizualirarea este ajustata pentru fiecare utilizator.

44 00:03:03,000 --> 00:03:08,990 Now here is a place where JavaScript will let you be sloppy. I won't. 45 00:03:09,000 --> 00:03:12,990 Now technically the word var is not even required. 46 00:03:13,000 --> 00:03:17,990 In JavaScript if you just write a line of code like this without var, JavaScript 47 00:03:18,000 --> 00:03:21,990 will go looking for an existing variable called year to put this value in, but 48 00:03:22,000 --> 00:03:26,990 if it doesn't find it, it will just make it. 49 00:03:27,000 --> 00:03:30,990 However, we are always going to use the word var when defining our variables. 50 00:03:31,000 --> 00:03:35,990 There are couple of situations where leaving var off can lead to unexpected 51 00:03:36,000 --> 00:03:38,990 behavior, so make a habit of always using it in your JavaScript. 52 00:03:39,000 --> 00:03:42,990 Now once again JavaScript is case sensitive. 53 00:03:43,000 --> 00:03:47,990 That means if I create a variable called x with a lowercase x, that's one.

54 00:03:48,000 --> 00:03:50,990 If I use the word uppercase X, that's two. 55 00:03:51,000 --> 00:03:52,990 These are two different variables. 56 00:03:53,000 --> 00:03:55,990 This second line here might have been an accident. 57 00:03:56,000 --> 00:03:59,990 Maybe I meant to say lowercase x, but because of the automatic creation of 58 00:04:00,000 --> 00:04:06,990 variables without the word var, you would now have two different variables and 59 00:04:07,000 --> 00:04:10,990 nothing in JavaScript would actually give you an error on this. 60 00:04:11,000 --> 00:04:12,990 So be careful when you're naming your variables. 61 00:04:13,000 --> 00:04:18,990 Now if you are creating multiple variables at the same time, you can of course 62 00:04:19,000 --> 00:04:23,990 do them on multiple lines like this but you can actually combine them on to one 63 00:04:24,000 --> 00:04:26,990 line, separating the variable names with commas. 64 00:04:27,000 --> 00:04:31,990 It's just a shorthand way of doing this. And similar to that if you're actually 65 00:04:32,000 --> 00:04:37,990 creating multiple variables and giving them all initial values you can still 66 00:04:38,000 --> 00:04:39,990 combine them on to one line. 67 00:04:40,000 --> 00:04:42,990 This makes it a little easier to read, a little shorter to write. 68 00:04:43,000 --> 00:04:48,990 Now in JavaScript, once you've actually created a variable you can put anything in it.

69 00:04:49,000 --> 00:04:53,990 Numbers, text, dates, it could start with a number, then put some text, then put 70 00:04:54,000 --> 00:04:57,990 a date in it, and that might not sound unusual, but a lot of other languages 71 00:04:58,000 --> 00:04:58,990 don't let you do that. 72 00:04:59,000 --> 00:05:03,990 Creating a variable in many languages does not just mean defining a container 73 00:05:04,000 --> 00:05:08,990 but also saying what type of container it is and what it can hold, and while 74 00:05:09,000 --> 00:05:12,990 that's not essential in JavaScript, it's really useful to know. 75 00:05:13,000 --> 00:05:23,000 More reasons to publish on Scribd Scribd's platform is designed to help you easily publish your content on the web and mobile devices, distribute it to a wide and global audience, and potentiall y make money from selling that content. Here's more on the benefits of publishin g on Scribd.

Das könnte Ihnen auch gefallen