Page blanche 03

Menu en Accordéon " A "

Bonjour, je vous souhaite la bienvenue sur le site. Message d'accueil conçu pour présenter une personne à un nouveau lieu ou une nouvelle situation et pour la mettre à l'aise. Bonjour, je vous souhaite la bienvenue sur le site. Message d'accueil conçu pour présenter une personne à un nouveau lieu ou une nouvelle situation et pour la mettre à l'aise. Bonjour, je vous souhaite la bienvenue sur le site. Message d'accueil conçu pour présenter une personne à un nouveau lieu ou une nouvelle situation et pour la mettre à l'aise. Bonjour, je vous souhaite la bienvenue sur le site. Message d'accueil conçu pour présenter une personne à un nouveau lieu ou une nouvelle situation et pour la mettre à l'aise

Le World Wide Web, la Toile mondiale ou la Toile, est un système hypertexte public fonctionnant sur Internet. Le Web permet de consulter, avec un navigateur, des pages accessibles sur des sites.

Découvrez tous les moyens de nous contacter · Plus d'informations · Questions & réponses .


Menu en Accordéon " A " Fermeture auto

Le World Wide Web, la Toile mondiale ou la Toile, est un système hypertexte public fonctionnant sur Internet.

Message d'accueil conçu pour présenter une personne à un nouveau lieu ou une nouvelle situation et pour la mettre à l'aise.

Découvrez tous les moyens de nous contacter · Plus d'informations · Questions & réponses .


CSS - ombre à dégradé linéaire gauche / droite "dynamique"

CodePen - Accordéon HTML uniquement

Table Test
First Name Last Name Number City Team Position Sport College Age Active
Demarcus Ware 94 Dallas Cowboys OLB Football Troy 30 Yes
Tony Romo 9 Dallas Cowboys QB Football Eastern Illinois 32 Yes
Jason Witten 82 Dallas Cowboys TE Football Tennessee 30 Yes

Hypertext Accordion

Details

Lorem ipsum dolor sit amet, eu alia suscipit mei. Reque iriure delectus vix id, ex sed forensibus suscipiantur. In eos exerci mollis apeirian, an qui latine alienum. Ad mea libris maluisset, consul assueverit sea ex.

Features

Lorem ipsum dolor sit amet, eu alia suscipit mei. Reque iriure delectus vix id, ex sed forensibus suscipiantur. In eos exerci mollis apeirian, an qui latine alienum. Ad mea libris maluisset, consul assueverit sea ex.

Information

Lorem ipsum dolor sit amet, eu alia suscipit mei. Reque iriure delectus vix id, ex sed forensibus suscipiantur. In eos exerci mollis apeirian, an qui latine alienum. Ad mea libris maluisset, consul assueverit sea ex.

Specifications

Lorem ipsum dolor sit amet, eu alia suscipit mei. Reque iriure delectus vix id, ex sed forensibus suscipiantur. In eos exerci mollis apeirian, an qui latine alienum. Ad mea libris maluisset, consul assueverit sea ex.


CodePen - Élément de détails avec flèche personnalisée

CodePen - Enseigner l'élément de détails avec ... Éléments de détails !

Details element with custom arrow!
Give me attention or face the wrath of my claws give me attention or face the wrath of my claws and pretend not to be evil cats go for world domination allways wanting food. Eat owner's food playing with balls of wool and meow and walk away, and bleghbleghvomit my furball really tie the room together. Cuddle no cuddle cuddle love scratch scratch cat
Have you heard about details?

It's a pretty useful element that handles accordion / collapsed text natively!

So how does it work?

You wrap a details element around any block of HTML content. The browser will collapse that block of text until a user opens the details block.

Once a user opens a details block, they'll be able to read all that hidden content!

If you want the details block open by default, include the open attribute on the opening tag:

<​details open>...<​/details>
But how do I set a custom title?

That's pretty manageable too! Use the summary element.

Put a summary at the beginning of your details element and Boom! - you've got a custom title for your details block.

No worries if you don't add a summary. The browser will put the word "Details" in there for you. (After all, users need something to click!)

That's cool, but what about styles?

Yes, you're covered there too! Style the details element however you like. Give it a border, some padding, whatever.

The summary element is where the ▸ marker lives. If you want to get rid of that, there is a prefixed pseudo-element selector ::-webkit-details-marker: set that to display: none for WebKit browsers. In Firefox, it's much simpler: set the summary to display: block or flex (anything but the native display: list-item) and you'll get rid of the ▸ for you.

Ok, ok, but what about styling based on state?

Once again, details has got your back! When a details block is open, it has the open attribute that I mentioned earlier. To style it (or its children) based on its state, use details[open] { }.

Note: there's no closed attribute: styles you apply by "default" will be used on the closed state.

But this requires JavaScript, right?

Open the JS panel on this pen. Clean as a whistle! This is handled totally by the browser.

What about accessibility? Is that the catch?

Sorry to disappoint you. Since these are native HTML elements, they provide useful semantic information to screen readers.

Screen readers will typically read the summary for a collapsed details block (and communicate that it's collapsed). They'll also provide an interactive hook for users to open the details block. If the details is already expanded, they'll read the whole content.

I don't rely on assistive tech to read the web, so I'm probably not aware of some limitations or drawbacks to using details and summary, but I suspect their AX is at least as good as (if not better than) most JavaScript-dependent accordion solutions.

Excellent! More information, please!

You bet! Here are some great resources on details & summary:

  • MDN: details, summary
  • HTML5Doctor
  • Scott O'Hara
  • Treehouse Blog
  • Envato Tuts+
  • caniuse table for details
But what about cross-browser compatibility?

Yeah, sorry. Here's some bad news. IE, Edge, and Opera Mini don't currently support details/summary with native open/close behavior (check out caniuse data for details).

These browsers will show all your details elements expanded. That's not the worst though: it's a bit of progressive enhancement: if the browser doesn't support the native UI behavior, the content will still be visible to users.

It's unlikey IE11 will be getting any updates on this front, but there's hope for Edge! If this is important to you, please cast a vote a vote for Edge to support details/summary. (Or just wait for Edge to use Chromium, I guess. 😕)

If you do need to have open/close behavior in IE11 (or any other non-supporting browser), you'll probably need a polyfill. This Smashing Magazine details polyfill tutorial looks like a good place to start.


CodePen - Recette d'enchiladas et #CodePenChallenge

Titre

Ingredients

  • 3 tbsp olive oil
  • 2 red onions, sliced
  • 2 red peppers, sliced
  • 3 red chillies, 2 deseeded and chopped, 1 sliced
  • small bunch coriander, stalks finely chopped, leaves roughly chopped
  • 2 garlic cloves, crushed
  • 1 tbsp ground coriander
  • 1 tbsp cumin seeds
  • 6 skinless chicken breasts, cut into small chunks
  • 415g can refried beans
  • 198g can sweetcorn
  • 700ml bottle passata
  • 1 tsp golden caster sugar
  • 10 tortillas
  • 2 x 142ml pots soured cream
  • 200g cheddar grated
Step 1.

Heat 2 tbsp of the oil in your largest pan, then fry the onions, peppers, chopped chilli and coriander stalks with half the garlic for 10 mins until soft. Stir in 2 tsp ground coriander and 2 tsp cumin seeds, then fry for 1 min more. Meanwhile, in another frying pan, fry the chicken in the remaining oil, in batches, until browned – add it to the pan of veg as it is done.

Step 2.

Stir the beans, sweetcorn, coriander leaves and 150ml of the passata into the veg and chicken. In a bowl, mix the rest of the passata with the other crushed garlic clove, the remaining spices and the sugar, then set aside.

Step 3.

To assemble, lay the tortillas onto a board and divide the chicken mixture between them, folding over the ends and rolling up to seal. Divide the passata sauce into the dishes you are using, then top with the enchiladas. Dot over the soured cream, sprinkle with grated cheese and scatter with the sliced chilli.

Step 4.

Cool and freeze (see freezing tips, below) or, if eating straight away, heat oven to 200C/180C fan/gas 6, then bake for 30 mins, scattering with more coriander leaves to serve, if you like