Sol segundo span

De wikiserver
La revisió el 11:04, 7 abr 2016 per Jnoguera (Discussió | contribucions) (Es crea la pàgina amb «<source lang="java"> <!DOCTYPE html> <html> <head> <style> .ancestors * { display: block; border: 2px solid lightgrey; color: lightgrey; padding: 5px; …».)
(dif) ← Versió més antiga | Versió actual (dif) | Versió més nova → (dif)
Dreceres ràpides: navegació, cerca
<!DOCTYPE html>
<html>
<head>
<style>
.ancestors * { 
    display: block;
    border: 2px solid lightgrey;
    color: lightgrey;
    padding: 5px;
    margin: 15px;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("body").find("span").eq(1).css({"color": "red", "border": "2px solid red"});
});
</script>
</head>

<body class="ancestors">body 
  <div style="width:500px;">div 
 <span>span </span> 
    <ul>ul 

     
        <span>span </span>
<span>span </span>
      
    </ul>   
  </div>
</body>

</html>