简体   繁体   中英

How do I display ► Play (Forward) or Solid right arrow symbol in html?

我如何在 html 中显示这个 ► 播放(前进)或实心右箭头符号?

Yes, ► , but it might not look the same in all browsers.

If you need to use it in CSS, as in

    li:before {
        content: '\25BA';
    }

This is the CSS conversion of ►A helpful tool for these conversions: evotech.net/articles/testjsentities.html

► from Wolfram Alpha

I tried using the ascii code but didn't like it as it always looked stretched.

Instead, I found an ingenious easily customizable solution online, that uses css and only manipulates the border property:

 .play { border-top: 10px solid white; border-bottom: 10px solid white; border-left: 20px solid black; height: 0px; }
 <div class="play"></div>

Here's a long list of what you can use:

http://brucejohnson.ca/SpecialCharacters.html

You can use Bootstrap glyphicons.

<span class="glyphicon glyphicon-play"></span><br>
<span class="glyphicon glyphicon-play-circle"></span><br>
<span class="glyphicon glyphicon-triangle-right"></span><br>

Remember to also include Bootstrap and jQuery in the <head> element.

<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"> 
</script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</head>

JSFiddle explaining this: https://jsfiddle.net/canada/dfr90pac/

Well, you could use an image and display it in the <img> tags. On their click event, you could write some JavaScript code. You could search the images in Google.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM