Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <h1>네이버 뉴스 감성 아이콘 상태 표시</h1>

상태 표시와 액션 버튼을 같이 사용하고 있어 상태가 잘 드러나지 않고 있다.<br>

<img src=https://pbs.twimg.com/media/C8YCnomV0AITKu6.jpg:large>
              
            
!

CSS

              
                .u_likeit_list a:before{
  transform-origin:bottom;
}
              
            
!

JS

              
                $(function(){
  setTimeout(redesign,500);
})

function redesign(){
//좋아요
    var max_count=1;
  $(".u_likeit .u_likeit_list_count").each(function(){
	var count=parseInt($(this).text());
  if(count>max_count) max_count=count;
	});
  $(".u_likeit .u_likeit_list_count").each(function(i){
	var count=parseInt($(this).text());
	console.log(i,count,max_count);
var size=count/max_count*0.5+0.5;
var opacity=count/max_count*0.8+0.5;
var gray=0;
if(count==0) gray=1;
	var style="<style>.u_likeit_list:nth-child("+(i+1)+") a:before{transform:scale("+size+");opacity:"+opacity+";filter:grayscale("+gray+");}</style>"
$(style).appendTo('head');
	});
}
              
            
!
999px

Console