-->

miércoles, 24 de abril de 2019

20.- Barras de navegación con iconos (JQuery Mobile)

Para agregar un ícono a su botón de navegación, use el atributo data-icon.

El atributo de icono de datos utiliza los mismos valores que las clases de CSS especificadas en el tema de "Iconos". La única diferencia es que, en lugar de especificar class = "ui-icon- value ", especifica el atributo de data-icon="value".


Attribute ValueDescriptionIcon
data-icon="home"Home
data-icon="arrow-r"Flecha derecha
data-icon="search"Buscar
Ejemplo:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>

</head>
<body>
 <div data-role="page" id="pageone">
  <div data-role="header">
   <h1>Bienvenido a mi pagina</h1>
   <div data-role="navbar">
    <ul>
     <li><a href="#" data-icon="home">Inicio</a></li>
     <li><a href="#" data-icon="arrow-r">Pagina dos</a></li>
     <li><a href="#" data-icon="search">Buscar</a></li>
    </ul>
   </div>
  </div>
  
  <div data-role="main" class="ui-content">
   <p>Aqui va mi contenido..</p>
  </div>

  <div data-role="footer">
   <h1>Pie de pagina</h1>
  </div>
 </div>
</body>
</html>

Resultado:

Listado de iconos en JQuery Mobile

ValueDescriptionIconExample
actionAction (arrow pointing clockwise out of a box)
alertAlert
audioAudio / Sound / Speakers
arrow-d-lArrow pointing downwards to the left
arrow-d-rArrow pointing downwards to the right
arrow-u-lArrow pointing upwards to the left
arrow-u-rArrow pointing upwards to the right
arrow-lArrow pointing left
arrow-rArrow pointing right
arrow-uArrow pointing up
arrow-dArrow pointing down
backBack (curved arrow pointing counterclockwise upwards)
barsBars (three horizontal bars over each other)
bulletsBullets (three horizontal bullets over each other)
calendarCalendar
cameraCamera
carat-dCarat pointing down
carat-lCarat pointing left
carat-rCarat pointing right
carat-uCarat pointing up
checkCheckmark
clockClock
cloudCloud
commentComment
deleteDelete (X)
editEdit / Pencil
eyeEye
forbiddenForbidden sign
forwardForward
gearGear
gridGrid
heartHeart / Love symbol
homeHome
infoInformation
locationLocation / GPS
lockLock / Padlock
mailMail / Letter
minusMinus
navigationNavigation
phoneTelephone
powerPower (On/off)
plusPlus
recycleRecycle
refreshRefresh
searchSearch
shopShop / Pag / Purse
starStar
tagTag
userUser / Person
videoVideo Camera



No hay comentarios:

Publicar un comentario