¿Cómo hacer un marcado de encabezado básico usando jQuery Mobile?

jQuery Mobile es una tecnología basada en la web que se utiliza para crear contenido receptivo al que se puede acceder en todos los teléfonos inteligentes, tabletas y computadoras de escritorio. En este artículo, haremos un marcado de encabezado básico usando jQuery Mobile.

Enfoque: Primero, agregue los scripts jQuery Mobile necesarios para su proyecto.

<enlace rel=”hoja de estilo” 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.1.min.js”></script>
<script src=”http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min .js”></secuencia de comandos>

Ejemplo 1:

HTML

<!DOCTYPE html>
<html>
  
<head>
    <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.1.min.js">
    </script>
  
    <script src=
"http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js">
    </script>
</head>
  
<body>
    <center>
        <h1>GeeksforGeeks</h1>
  
        <h4>
            Basic header markup in 
            jQuery Mobile
        </h4>
    </center>
  
    <div data-role="Header" class="ui-bar">
        <a href="https://www.geeksforgeeks.org/"
            data-icon="plus">A</a>
  
        <a href="https://www.geeksforgeeks.org/"
            data-icon="minus">B</a>
          
        <a href="https://www.geeksforgeeks.org/"
            data-icon="arrow-u">C</a>
          
        <a href="https://www.geeksforgeeks.org/"
            data-icon="arrow-d">D</a>
          
        <a href="https://www.geeksforgeeks.org/"
            data-icon="arrow-l">E</a>
          
        <a href="https://www.geeksforgeeks.org/"
            data-icon="arrow-r">F</a>
    </div>
</body>
  
</html>

Producción:

Ejemplo 2:

HTML

<!DOCTYPE html>
<html>
  
<head>
    <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.1.min.js">
    </script>
  
    <script src=
"http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js">
    </script>
</head>
  
<body>
    <center>
        <h1>GeeksforGeeks</h1>
  
        <h4>
            Basic header markup in 
            jQuery Mobile
        </h4>
    </center>
  
    <div data-role="Header" class="ui-bar">
        <button id="gfg" data-icon="plus">A</button>
        <button id="gfg" data-icon="minus">B</button>
        <button id="gfg" data-icon="arrow-u">C</button>
        <button id="gfg" data-icon="arrow-d">D</button>
        <button id="gfg" data-icon="arrow-l">E</button>
        <button id="gfg" data-icon="arrow-r">F</button>
    </div>
</body>
  
</html> 

Producción:

Publicación traducida automáticamente

Artículo escrito por taran910 y traducido por Barcelona Geeks. The original can be accessed here. Licence: CCBY-SA

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *