" を使用してスタイルを設定すると、スマート クォートを厳密に模倣しているように見えますが、すべてのインスタンスをandfont-style: italic
で囲んだ方が満足できるかどうかはわかりません。<em>
</em>
.magic-quotes {font-style: italic; }
<span class="magic-quotes">"</span>quoted-text<span class="magic-quotes">"</span>
または、おそらく:before
および:after
疑似クラスを使用すると、
.stuff-to-magic-quote:before
{content: '"';
font-style: italic; }
.stuff-to-magic-quote:after
{content: '"';
font-style: italic; }
<span class="stuff-to-magic-quote">this text would be quoted</span>.
しかし、コピー&ペーストで引用符を取得することはできません。
あなたが望むものを達成するには、何らかの形のJSが必要になるかもしれません。引用のスタイルを自動的に設定し、魔法の引用以外の形式でコピー&ペーストできるようにします。
編集して、魔法の引用とそのコピーと貼り付けの問題に対するあなたの嫌悪を共有していることを追加しました. そして後で編集して凶悪な<em>
タグを修正し、代わりに<span>
s.
...おそらく、もう少し先に進むことができるかもしれませんが、実際の報酬が少なすぎるのに、タイピングが多すぎる可能性があることに気づきました。
.original-quotes-open {margin: 0 -2em 0 0;
z-index: 0; }
.original-quotes-close {margin: 0 0 0 -2em;
z-index: 0; } /* the idea of the -2em and z-index is to position the original non-magic quotes behind the text, but not remove them from the document */
span.quoted-text {z-index: 2; /* or higher than the .original-quotes... classes */
span.quoted-text:before {content: "“"; }
span.quoted-text:after {content: "”"; }
<span class="original-quotes-open">"</span><span class="quoted-text">This text is quoted</span><span class="original-quotes-close">"</span>
しかし、正直なところ、余分な努力からの良い結果は見られません。