HTML é a linguagem de marcação padrão para criar páginas da Web.
Javascript muda valor de elemento html elemento html '<'p id="titulo"'>' Portalx Page '<'/p'>' botao chamada da funcao '<'button type="button" onclick="MudarTitulo()"'>'MudarTitulo '<'/button '>' '<'script type="text/javascript"'>' function MudarTitulo() { document.getElementById("titulo").value // pega valor de elemento html se desejar manipular document.getElementById("titulo").innerHTML="PORTALX J" // coloca novo valor no elemento } '<'/scrip'>'
Valores de cores CSS
Com o CSS, as cores podem ser especificadas de diferentes maneiras:
Por nomes de cores
- Como valores RGB
- Como valores hexadecimais
- Como valores de HSL (CSS3)
- Como valores HWB (CSS4)
Nomes de cores suportados por todos os navegadores
Todos os navegadores modernos suportam os 140 nomes de cores a seguir
(clique no nome de uma cor ou em um valor hexadecimal para exibir a cor
como a cor de segundo plano junto com cores de texto diferentes):
Cores RGB
Valores de cores RGB são suportados em todos os navegadores.
Um valor de cor RGB é especificado com: rgb ( RED , GREEN , BLUE ).
Cada parâmetro define a intensidade da cor como um inteiro entre 0 e 255.
Por exemplo, rgb (0,0,255) é renderizado como azul, porque o parâmetro blue
é definido como seu valor mais alto (255) e os outros são definidos como 0.
Como valores hexadecimais
Cores hexadecimais
Valores de cor hexadecimais também são suportados em todos os navegadores.
Uma cor hexadecimal é especificada com: # RR GG BB .
RR (vermelho), GG (verde) e BB (azul) são inteiros hexadecimais
entre 00 e FF especificando a intensidade da cor.
Por exemplo, # 0000FF é exibido como azul, porque o componente azul é definido
como seu valor mais alto (FF) e os outros são definidos como 00.
RnnGnnBnn
nn variam de 00 a 99 e de AA aFF
#FF000
Clique aqui para lista de cores
The CSS box model is essentially a box that wraps around every HTML element. It consists of: borders, padding, margins, and the actual content.
AliceBlue #F0F8FF
AntiqueWhite #FAEBD7
Aqua #00FFFF
Aquamarine #7FFFD4
Azure #F0FFFF
Beige #F5F5DC
Bisque #FFE4C4
Black #000000
BlanchedAlmond #FFEBCD
Blue #0000FF
BlueViolet #8A2BE2
Brown #A52A2A
BurlyWood #DEB887
CadetBlue #5F9EA0
Chartreuse #7FFF00
Chocolate #D2691E
Coral #FF7F50
CornflowerBlue #6495ED
Cornsilk #FFF8DC
Crimson #DC143C
Cyan #00FFFF
DarkBlue #00008B
DarkCyan #008B8B
DarkGoldenRod #B8860B
DarkGray #A9A9A9
DarkGrey #006400
DarkKhaki #BDB76B
DarkMagenta #8B008B
DarkOliveGreen #556B2F
DarkOrange #FF8C00
DarkOrchid #9932CC
DarkRed #8B0000
DarkSalmon #E9967A
DarkSeaGreen #8FBC8F
DarkSlateBlue #483D8B
DarkSlateGray #2F4F4F
DarkSlateGrey #2F4F4F
DarkTurquoise #00CED1
DarkViolet #9400D3
DeepPink #FF1493
DeepSkyBlue #00BFFF
DimGray #696969
DimGrey #696969
DodgerBlue #1E90FF
FireBrick #B22222
FloralWhite #FFFAF0
ForestGreen #228B22
Fuchsia #FF00FF
Gainsboro #DCDCDC
GhostWhite #F8F8FF
Gold #FFD700
GoldenRod #DAA520
Gray #808080
Grey #808080
Green #008000
GreenYellow #ADFF2F
HoneyDew #F0FFF0
HotPink #FF69B4
IndianRed #CD5C5C
Indigo #4B0082
Ivory #FFFFF0
Khaki #F0E68C
Lavender #E6E6FA
LavenderBlush #FFF0F5
LawnGreen #7CFC00
LemonChiffon #FFFACD
LightBlue #ADD8E6
LightCoral #F08080
LightCyan #E0FFFF
LightGoldenRodYellow #FAFAD2
LightGray #D3D3D3
LightGrey #D3D3D3
LightGreen #90EE90
LightPink #FFB6C1
LightSalmon #FFA07A
LightSeaGreen #20B2AA
LightSkyBlue #87CEFA
LightSlateGray #778899
LightSlateGrey #778899
LightSteelBlue #B0C4DE
LightYellow #FFFFE0
Lime #00FF00
LimeGreen #32CD32
Linen #FAF0E6
Magenta #FF00FF
Maroon #800000
MediumAquaMarine #66CDAA
MediumBlue #0000CD
MediumOrchid #BA55D3
MediumPurple #9370DB
MediumSeaGreen #3CB371
MediumSlateBlue #7B68EE
MediumSpringGreen #00FA9A
MediumTurquoise #48D1CC
MediumVioletRed #C71585
MidnightBlue #191970
MintCream #F5FFFA
MistyRose #FFE4E1
Moccasin #FFE4B5
NavajoWhite #FFDEAD
Navy #000080
OldLace #FDF5E6
Olive #808000
OliveDrab #6B8E23
Orange #FFA500
OrangeRed #FF4500
Orchid #DA70D6
PaleGoldenRod #EEE8AA
PaleGreen #98FB98
PaleTurquoise #AFEEEE
PaleVioletRed #DB7093
PapayaWhip #FFEFD5
PeachPuff #FFDAB9
Peru #CD853F
Pink #FFC0CB
Plum #DDA0DD
PowderBlue #B0E0E6
Purple #800080
RebeccaPurple #663399
Red #FF0000
RosyBrown #BC8F8F
RoyalBlue #4169E1
SaddleBrown #8B4513
Salmon #FA8072
SandyBrown #F4A460
SeaGreen #2E8B57
SeaShell #FFF5EE
Sienna #A0522D
Silver #C0C0C0
SkyBlue #87CEEB
SlateBlue #6A5ACD
SlateGray #708090
SlateGrey #708090
Snow #FFFAFA
SpringGreen #00FF7F
SteelBlue #4682B4
Tan #D2B48C
Teal #008080
Thistle #D8BFD8
Tomato #FF6347
Turquoise #40E0D0
Violet #EE82EE
Wheat #F5DEB3
White #FFFFFF
WhiteSmoke #F5F5F5
Yellow #FFFF00
YellowGreen #9ACD32
This paragraph has its own background color.
We are still in the div element.This div has background-image: url(../images/bt_br.gif); - paragraph has its own background color.
This div has background-image: url(../images/bt_br.gif);background-repeat: repeat-x;
This div has margin-right: 200px; background-image: url(../images/bt_br.gif);background-repeat: no-repeat;
background-position: right top; background-size: 100px 100px border-radius: 12px
The background image starts from the upper left corner of the padding edge.
The background image starts from the upper left corner of the border.
The background image starts from the upper left corner of the content.
In this example, the image will float to the right left or none in the paragraph, and the text in the paragraph will wrap around the image.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus imperdiet, nulla et dictum interdum, nisi lorem egestas odio, vitae scelerisque enim ligula venenatis dolor. Maecenas nisl est, ultrices nec congue eget, auctor vitae massa. Fusce luctus vestibulum augue ut aliquet. Mauris ante ligula, facilisis sed ornare eu, lobortis in odio. Praesent convallis urna a lacus interdum ut hendrerit risus congue. Nunc sagittis dictum nisi, sed ullamcorper ipsum dignissim ac. In at libero sed nunc venenatis imperdiet sed ornare turpis. Donec vitae dui eget tellus gravida venenatis. Integer fringilla congue eros non fermentum. Sed dapibus pulvinar nibh tempor porta. Cras ac leo purus. Mauris quis diam velit.In at libero sed nunc venenatis imperdiet sed ornare turpis. Donec vitae dui eget tellus gravida venenatis. Integer fringilla congue eros non fermentum. Sed dapibus pulvinar nibh tempor porta. Cras ac leo purus. Mauris quis diam velit.In at libero sed nunc venenatis imperdiet sed ornare turpis. Donec vitae dui eget tellus gravida venenatis. Integer fringilla congue eros non fermentum. Sed dapibus pulvinar nibh tempor porta. Cras ac leo purus. Mauris quis diam velit.
In this example, the image is taller than the element containing it, and it is floated, so it overflows outside of its container:
Add the clearfix hack to the containing element, to fix this problem:
Float boxes side by side:
Some text inside the box1.
Some text inside the box2.
Some text inside the box3.
Note that we also use the clearfix hack to take care of the layout flow, and that add the box-sizing property to make sure that the box doesn't break due to extra padding. Try to remove this code to see the effect.
To use W3.CSS in your web site, just add a link to "w3.css" from your web pages:
https://www.w3schools.com/w3css/4/w3.css
Or download w3.css from w3css_downloads and add a link to w3.css::
A car is a wheeled, self-powered motor vehicle used for transportation.
My Footer
Container with class=w3-container w3-red.
Adds a 16px left and right padding to any HTML element. Without margins
Container with class=w3-container w3-yellow. br>Is the perfect class to use for all HTML
Container with class=w3-container w3-text-red..
Is the perfect class to use for all HTML
Container with class w3-container w3-orange w3-hover-red.
The w3-panel class is perfect for displaying notes with class w3-panel w3-pale-green.
The w3-panel class adds a 16px top and bottom margin and a 16px left and right padding to any HTML element.
London is the most .. div w3-panel w3-blue w3-round-xlarge....
Click on the X to close this panel.
To close panel.
I have red borders.
I have a green top and bottom border.
Border that turns red on hover
Red border that turns blue on hover
Class Defines w3-border Adds borders (top, right, bottom, left) to an element w3-border-top Adds a top border to an element w3-border-right Adds a right border to an element w3-border-bottom Adds a bottom border to an element w3-border-left Adds a left border to an element w3-border-0 Removes all borders w3-border-color Displays the border in a specified color (like red, blue, etc) w3-hover-border-color Adds a hoverable border color w3-bottombar Adds a thick bottom border to an element w3-leftbar Adds a thick left border to an element w3-rightbar Adds a thick right border to an element w3-topbar Adds a thick top border to an element
Position of text inside an image
The w3-display-hover class displays content on hover inside a w3-display-container (goes from hidden to shown).
The w3-left class floats an element to the left, and the w3-right class floats an element to the right:
Class Defines w3-btn A rectangular button with a shadow hover effect. Default color is black. w3-button A rectangular button with a gray hover effect. Default color is light-gray in W3.CSS version 3. Default color is inherited from parent element in version 4. w3-bar A horizontal bar that can be used to group buttons together. (Perfect for horizontal navigation menus) w3-block Class that can be used to define a full width (100%) button. w3-circle Can be used to define a circular button. w3-ripple Can be used to create a ripple effect.
The w3-block class creates a full-width button.
The size of the block can be defined using style="width:".
Link buttons:
Link Button Link ButtonButton buttons:
Input buttons:
Link buttons:
Link Button Link ButtonButton buttons:
Input buttons:
Buttons can be grouped together in a horizontal bar using the w3-bar class:
Buttons can be grouped together without a space between them by using w3-bar-item class:
Two button groups on the same line (if enough space):
Buttons bars can be centered using the w3-center class:
Two button groups on the same line (if enough space):
Buttons bars can easily be used as navigation bars:
The size of each items can be defined by using style="width:":
Used to create "previous/next" buttons:
Click on the buttons to see the effect:
button is a image
Uso de w3.css - Table and List
The w3-table-all class combines the w3-table, w3-bordered, w3-striped, and w3-border classes:
First Name | Last Name | Points |
---|---|---|
Jill | Smith | 50 |
Eve | Jackson | 94 |
Adam | Johnson | 67 |
Bo | Nilson | 35 |
To flip the zebra-stripes, add thead around the table header:
First Name | Last Name | Points |
---|---|---|
Jill | Smith | 50 |
Eve | Jackson | 94 |
Adam | Johnson | 67 |
Bo | Nilson | 35 |
First Name | Last Name | Points |
---|---|---|
Jill | Smith | 50 |
Eve | Jackson | 94 |
Adam | Johnson | 67 |
Bo | Nilson | 35 |
The w3-hoverable class adds a grey background color on mouse-over
First Name | Last Name | Points |
---|---|---|
Jill | Smith | 50 |
Eve | Jackson | 94 |
Adam | Johnson | 67 |
If you want different hover colors, add w3-hover-color classes to each tr element:
First Name | Last Name | Points |
---|---|---|
Jill | Smith | 50 |
Eve | Jackson | 94 |
Adam | Johnson | 67 |
Bo | Nilson | 35 |
If you want a specific hover color, add any of the w3-hover-classes to each li element:
The w3-card class makes the list look like a card:
More shadows:
You can combine w3-ul and the w3-bar classes to create an avatar list:
The w3-round classes add rounded corners to an image:
w3-round-small:
w3-round:
w3-round-large:
w3-round-xlarge:
w3-round-xxlarge:
The w3-circle class shapes an image to a circle:
The w3-border class adds borders around the image.
Padding added wil be inside the borders:
More padding:
Wrap any of the w3-card classes around the image to display it as a card:
Card with shadows:
The boss of all bosses
More shadows:
The other boss
Position content inside an image with the w3-display-classes - Note that we have added the w3-container class to get more padding:
Top Left
Top Right
Bottom Left
Bottom Right
Left
Right
Top Middle
Bottom Middle
The w3-opacity classes adds transparency to an element.
Normal (100% opacity):
w3-opacity-min (75% opacity):
w3-opacity (60% opacity):
w3-opacity-max (25% opacity):
Position content inside an image with the w3-display-classes - Note that we have added the w3-container class to get more padding:
Top Left
Top Right
Bottom Left
Bottom Right
Left
Right
Top Middle
Bottom Middle
An image can be set to automatically resize itself to fit the size of its container.
If you want the image to scale down if it has to, but never scale up to be larger than its original size, use the w3-image class.
Resize the browser window to see the effect.
The w3-grayscale classes add a grayscale effect to an element.
Note: The w3-grayscale classes are not supported in IE 11 and earlier versions.
Normal:
w3-grayscale-min:
w3-grayscale:
w3-grayscale-max (black and white):
The w3-sepia classes add a sepia effect to an element.
Note: The w3-sepia classes are not supported in IE 11 and earlier versions.
Normal:
w3-sepia-min:
w3-sepia:
w3-sepia-max:
You can also add special effects on hover/mouse-over.
Note: The w3-hover-sepia and w3-hover-grayscale classes are not supported in IE 11 and earlier versions.
w3-hover-opacity:
w3-hover-grayscale:
w3-hover-sepia:
The w3-hover-opacity class adds transparency to the image when you move the mouse over it:
The w3-hover-opacity-off class rempves transparency from an image when you move the mouse over it: